When calling the API via hook_menu(), exceptions should be converted to a JSON with HTTP error code, message and description.
Merge pull request #17 from Gizra/exceptions-code

Add exception handling.

When calling the API via hook_menu(), exceptions should be converted to a JSON with HTTP error code, message and description.