first draft of better error handling via amazingly intrusive metaprogramming