Add functions to convert between error handling styles