better error formatting
context is optional