Better exception handling

CocoaPods-like exception handling.
A task from https://trello.com/c/6lQMHxS6/60-improve-exception-handling