martinrusev / solid-node

Node.js client for Solid
https://solidapp.io
10 stars 6 forks source link

EventEmitter #2

Open qzaidi opened 12 years ago

qzaidi commented 12 years ago

Can we convert this to event emitter, so I can handle errors myself. Right now, if amon is down, it prints console.log messages

Error sending log data to Amon on /api/log/XXXXXX Please make sure that the web application is running on YYYYY

Instead, it can emit an error and I may just chose to log the original error message in my error handler.

I am willing to take this up if you can merge.

martinrusev commented 12 years ago

That makes sense. I think we can replace it with an Event emitter, but can you please send me an example :)

qzaidi commented 12 years ago

I forked the repo and made changes here https://github.com/qzaidi/amon-node

Haven't submitted a pull request as I have not yet tested this. Besides, I have made some functions private, so some of the tests are breaking. Please have a look.