Add exception code

It would be nice, to add exception code too.