Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catching TypeErrors to expose swarm failure errors. #2942

Closed
wants to merge 1 commit into from

Conversation

rhyolight
Copy link
Member

Fixes #1815.

@numenta-ci
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @rcrowder, @mrcslws and @mihail911 to be potential reviewers

@rhyolight
Copy link
Member Author

@scottpurdy

@scottpurdy
Copy link
Contributor

TypeError derives from Exception so I don't think this change will have an effect. I'm usually all for using more specific types and removing the broad Exception checks but in this case I think the intent is to catch all exceptions.

@rhyolight
Copy link
Member Author

@scottpurdy I don't understand how a TypeError is slipping out of this try clause!

    try:
      results = json.loads(jobInfo.results)
    except Exception, e:
      print "json.loads(jobInfo.results) raised an exception.  " \
            "Here is some info to help with debugging:"
      print "jobInfo: ", jobInfo
      print "jobInfo.results: ", jobInfo.results
      print "EXCEPTION: ", e
      raise

@scottpurdy
Copy link
Contributor

@rhyolight - My understanding is that that isn't possible...

@rhyolight
Copy link
Member Author

@scottpurdy It might not be possible, but I've seen it happen several times.

@rhyolight
Copy link
Member Author

@scottpurdy I'll work on replicating...

@rhyolight
Copy link
Member Author

@scottpurdy You are right, the TypeError is getting caught and simply re-raised.

@rhyolight rhyolight closed this Jan 15, 2016
@scottpurdy
Copy link
Contributor

All, I could see that being confusing to debug haha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants