<p>Yii does have <a href="http://www.yiiframework.com/doc/api/1.1/CApplication#onError-detail" rel="nofollow">onError</a> and <a href="http://www.yiiframework.com/doc/api/1.1/CApplication#onException-detail" rel="nofollow">onException</a> events that get raised when PHP errors/warnings/notices and exceptions happen.</p>

<p>You'd need to write a plugin that listened to those and did the Bugsnag magic, then.</p>

CC BY-SA 3.0
2015-07-02T06:59:32.117Z
nice, didn't know about those! Thanks.
Sidney Widmer
CC BY-SA 3.0
2015-07-01T17:45:20.503Z
2015-07-01T17:45:20.503Z
Brad Bell
<p>What would be a good approach to integrate a service like <a href="http://bugsnag.com" rel="nofollow">Bugsnag</a>? Is there some kind of global Error/Exception Handler where everything is routed through and I could hook in?</p>

<p><strong>Edit:</strong> Find the finished Plugin here: <a href="https://github.com/Goldinteractive/craft-bugsnag" rel="nofollow">craft-bugsnag</a></p>

<plugin-development><error-handling>
Integrate Bugsnag
# Integrate Bugsnag

(Asked by: username_0 on 2015-07-01)

What would be a good approach to integrate a service like [Bugsnag](http://bugsnag.com)? Is there some kind of global Error/Exception Handler where everything is routed through and I could hook in?

**Edit:** Find the finished Plugin here: [craft-bugsnag](https://github.com/Goldinteractive/craft-bugsnag)

**Tags:** plugin-development, error-handling

---

## 1 answers

### Answer by username_1 on 2015-07-01. Score: 2 | Accepted answer

Yii does have [onError](http://www.yiiframework.com/doc/api/1.1/CApplication#onError-detail) and [onException](http://www.yiiframework.com/doc/api/1.1/CApplication#onException-detail) events that get raised when PHP errors/warnings/notices and exceptions happen.

You'd need to write a plugin that listened to those and did the Bugsnag magic, then.

> **Comments:**
> **username_0**: nice, didn't know about those! Thanks.  

---

