refactor pry internal error system to use tagged exceptions #781

banister opened this Issue Dec 14, 2012 · 1 comment


None yet
1 participant

banister commented Dec 14, 2012

something like

def pry_raise(ex, msg="")
  e = ex.exception
  e.extend Pry::Error
  Pry.last_internal_error = e
  raise e, msg

This way we can raise any type of exception we want and it'll be properly handled by the repl loop (which will capture Pry::Error and indicate it's an internal error); we'll also have access to it in Pry.last_internal_error so we can properly debug internal exceptions, something that is currently not possible.


This comment has been minimized.

Show comment Hide comment

ghost Dec 14, 2012

Cool idea.

ghost commented Dec 14, 2012

Cool idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment