Commit 3848d6e4 authored by Andrei Mondoc's avatar Andrei Mondoc
Browse files

render error message in preview

parent bceabb74
......@@ -136,7 +136,7 @@ class CiviCRM_Gutenberg_Blocks {
],
'editor_script' => 'civicrm-gutenberg-blocks', // The script name we gave in the wp_register_script() call.
'render_callback' => [ $this, 'block_render' ],
] );
] );
/**
* May be extended to wp_set_script_translations( 'my-handle', 'my-domain',
......@@ -311,8 +311,8 @@ class CiviCRM_Gutenberg_Blocks {
'CiviContribute',
CRM_Core_Action::ADD
) )->run();
} catch (Exception $e) {
// silence
} catch ( Exception $e ) {
return $e->getMessage();
}
return ob_get_clean();
......@@ -339,12 +339,12 @@ class CiviCRM_Gutenberg_Blocks {
try {
if ( $atts['action'] == 'register' ) {
( new CRM_Event_Controller_Registration() )->run();
( new CRM_Event_Controller_Registration )->run();
} else {
( new CRM_Event_Page_EventInfo )->run();
}
} catch ( Exception $e ) {
// silence
return $e->getMessage();
}
return ob_get_clean();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment