fix exception during errors with on_source_error:raise option