Skip to content

Commit

Permalink
New feature: added mage_run_installed_exception event when uncatche…
Browse files Browse the repository at this point in the history
…d exception is thrown (#3613)

Co-authored-by: Pascal Querner <p.querner@ottomatik.de>
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
  • Loading branch information
3 people authored May 1, 2024
1 parent c9fba3b commit f215834
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ public static function run($code = '', $type = 'store', $options = [])
if (isset($options['edition'])) {
self::$_currentEdition = $options['edition'];
}
self::$_app = new Mage_Core_Model_App();
self::$_app = new Mage_Core_Model_App();
if (isset($options['request'])) {
self::$_app->setRequest($options['request']);
}
Expand All @@ -769,6 +769,7 @@ public static function run($code = '', $type = 'store', $options = [])
die();
} catch (Exception $e) {
if (self::isInstalled()) {
self::dispatchEvent('mage_run_installed_exception', ['exception' => $e]);
self::printException($e);
exit();
}
Expand Down
1 change: 1 addition & 0 deletions docs/EVENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
| log_log_clean_after | 1.9.4.5 |
| log_log_clean_before | 1.9.4.5 |
| log_visitor_collection_load_before | 1.9.4.5 |
| mage_run_installed_exception | 20.7.0 |
| mage_run_exception | 1.9.4.5 |
| model_config_data_save_before | 1.9.4.5 |
| model_delete_after | 1.9.4.5 |
Expand Down

0 comments on commit f215834

Please sign in to comment.