Use real error objects instead of strings