Better handling of exceptions, #111