Show More
@@ -51,10 +51,9 b' class EmbeddedMagics(Magics):' | |||
|
51 | 51 | def exit_raise(self, parameter_s=''): |
|
52 | 52 | """%exit_raise Make the current embedded kernel exit and raise and exception. |
|
53 | 53 | |
|
54 | This function (after asking for confirmation) sets an internal flag so | |
|
55 | that an embedded IPython will raise a `KillEmbeded` Exception on exit. | |
|
56 |
|
|
|
57 | instance. | |
|
54 | This function sets an internal flag so that an embedded IPython will | |
|
55 | raise a `IPython.terminal.embed.KillEmbeded` Exception on exit, and then exit the current I. This is | |
|
56 | useful to permanently exit a loop that create IPython embed instance. | |
|
58 | 57 | """ |
|
59 | 58 | |
|
60 | 59 | self.shell.should_raise = True |
@@ -148,7 +147,7 b' class InteractiveShellEmbed(TerminalInteractiveShell):' | |||
|
148 | 147 | print(self.exit_msg) |
|
149 | 148 | |
|
150 | 149 | if self.should_raise: |
|
151 | raise KillEmbeded('This instance has been marked as must raise on exit.') | |
|
150 | raise KillEmbeded('Embedded IPython raising error, as user requested.') | |
|
152 | 151 | |
|
153 | 152 | |
|
154 | 153 | def mainloop(self, local_ns=None, module=None, stack_depth=0, |
General Comments 0
You need to be logged in to leave comments.
Login now