2

Are their any best practices?

Maybe some way to hook to craft native exception / log handler with a third party implantation so I could track my errors on services like Sentry or Rollbar?

2

Update:

Went to look into this and while it's true that Craft doesn't have any explicit events around error handling, Yii already does in the form of onException and onError.

You can listen for them like so:

craft()->onException = array($this, 'myCustomExceptionMethodHandler');

and

craft()->onError = array($this, 'myCustomErrorMethodHandler');

Original answer:

Craft currently doesn't have any events around error handling, but it's probably not a bad idea to do so for situations like this.

I've added it to our list.

In the meantime, the only workaround I can think of is pretty sketchy, but a plugin could monitor the craft/storage/runtime/logs folder for [error] entries and parse the text for the information it needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.