better error reporting for ipython