racket/collects/tests/xrepl
Eli Barzilay c5b3317daf Make `enter!' go into a module even if there was an error when it was instantiated.
Previously, when trying to `enter!' into a module, an exception would
abort the whole thing, leaving the repl where it was.  This behavior can
be very confusing:

  > (module foo racket/base (define x 123) (error "bleh!"))
  > (enter! 'foo)
  bleh!
  > x
  reference to undefined identifier: x
  > (enter! 'foo)
  > x
  123

Things are a little better with xrepl, since the prompt always indicates
the module that you're in.  Still, it's unfortunate that a module with
an error is more likely to be something you'd want to debug -- and most
people are likely to miss the fact that entering a second time will work.

So make `enter!' catch exceptions when requiring the module, change the
namespace, and then re-raise the exception so the user sees it and is
left in the expected namespace.
2011-09-16 11:31:41 -04:00
..
main.rkt Much improved `wrapped-output'. 2011-08-02 16:56:02 -04:00
wrapping-output.rkt Much improved `wrapped-output'. 2011-08-02 16:56:02 -04:00
xrepl.rkt Make `enter!' go into a module even if there was an error when it was instantiated. 2011-09-16 11:31:41 -04:00