better output for thrown errors