Skip to content

Commit

Permalink
Improve error message on invalid __exit__
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbell10 committed Oct 1, 2019
1 parent d4ee810 commit b23faea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uarray/_uarray_dispatch.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ class context_helper
}
if (backends_->back() != new_backend_) {
PyErr_SetString(PyExc_RuntimeError,
"Found invalid context state while in __exit__");
"Found invalid context state while in __exit__. "
"__enter__ and __exit__ may be unmatched");
success = false;
}

Expand Down

0 comments on commit b23faea

Please sign in to comment.