File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,16 @@ function plugin_carbon_install(array $args = []): bool
8080 // do not output messages
8181 ob_start ();
8282 }
83- if ($ version === '0.0.0 ' ) {
84- $ success = $ install ->install ($ args );
85- } else {
86- $ success = $ install ->upgrade ($ version , $ args );
83+ try {
84+ if ($ version === '0.0.0 ' ) {
85+ $ success = $ install ->install ($ args );
86+ } else {
87+ $ success = $ install ->upgrade ($ version , $ args );
88+ }
89+ } catch (\RuntimeException $ e ) {
90+ $ error_footer = '<br /> ' . __ ('Please check the logs for more details. Fill an issue in the repository of the plugin. ' , 'carbon ' );
91+ Session::addMessageAfterRedirect ($ e ->getMessage () . $ error_footer , false , ERROR );
92+ $ success = false ;
8793 }
8894
8995 if ($ silent ) {
You can’t perform that action at this time.
0 commit comments