Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Dispatch an event if there is an exception#5

Merged
jadhub merged 2 commits into
AOEpeople:masterfrom
mpchadwick:event-dispatch
Jan 25, 2018
Merged

Dispatch an event if there is an exception#5
jadhub merged 2 commits into
AOEpeople:masterfrom
mpchadwick:event-dispatch

Conversation

@mpchadwick

Copy link
Copy Markdown
Contributor

Allows others to hook in if there are other requirements (e.g. alerting system).

Based on discussions in #4

Allows others to hook in if there are other requirements
(e.g. alerting system)
@mpchadwick

Copy link
Copy Markdown
Contributor Author

@LeeSaferite Any thoughts on this?

@sprankhub

Copy link
Copy Markdown

👍

@kesonno

kesonno commented Jun 22, 2017

Copy link
Copy Markdown

+1 for this addition 👍

@LeeSaferite

Copy link
Copy Markdown
Contributor

I see no reason not to merge this, but I no longer work for AOE and not longer have merge permissions.

@fbrnc

$try = $maxTries;
} catch (Exception $e) {
$try++;
Mage::dispatchEvent('aoe_dbretry_exception', ['try' => $try, 'exception' => $e]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my only input here would be to document the event in the readme and be VERY clear that further DB calls in the event handler are unsupported and dangerous.

@jadhub jadhub merged commit 15ada4a into AOEpeople:master Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants