Trim output and give thrown errors a name.