Issue #19 open

string exceptions

Anonymous avatarAnonymous created an issue

Source seems to contain a lot of string exceptions, resulting in:

TypeError: exceptions must be old-style classes or derived from BaseException, not str

Comments (4)

  1. James Taylor

    What version of the Python interpreter are you seeing this with? String exceptions have been deprecated, but they were not supposed to be removed until Python 3.0 I thought (according to PEP 317). bx-python is currently only available for Python 2.

  2. Anonymous

    I'm using Python 2.6.5:

    Python 2.6.5 (r265:79063, Apr 13 2010, 15:07:42) [GCC 4.0.1 (Apple Inc. build 5484)] on darwin

    Marc

  3. Bob Harris

    (Reply via rsh...bx.psu.edu):

    I'm pretty sure the intent of these string exceptions was to get a message to the user. So, if none of them are trapped by calling routines, an easy short term fix would be to change them to asserts, i.e. "raise s" becomes "assert False, s".

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.