Add exception handling feature

sendException(error)