diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 4c1863a..4c8e973 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2125,7 +2125,7 @@ class InteractiveShell(SingletonConfigurable): 'did you mean that instead?)' % magic_name ) error(etpl % (magic_name, extra)) elif cell == '': - warn('%%%%%s line but no cell' % magic_name) + raise UsageError('%%%%%s has line but no cell' % magic_name) else: # Note: this is the distance in the stack to the user's frame. # This will need to be updated if the internal calling logic gets