Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 872bf49

Browse files
committed
Update docs and error message
1 parent 6dd9570 commit 872bf49

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

IPython/terminal/embed.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ def kill_embedded(self, parameter_s=''):
5151
def exit_raise(self, parameter_s=''):
5252
"""%exit_raise Make the current embedded kernel exit and raise and exception.
5353
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-
This is useful to permanently exit a loop that create IPython embed
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.
5857
"""
5958

6059
self.shell.should_raise = True
@@ -148,7 +147,7 @@ def __call__(self, header='', local_ns=None, module=None, dummy=None,
148147
print(self.exit_msg)
149148

150149
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.')
152151

153152

154153
def mainloop(self, local_ns=None, module=None, stack_depth=0,

0 commit comments

Comments
 (0)