fleshed out error reporting framework