Macros to combine printf-style error reporting with exceptions