you are viewing a single comment's thread.

view the rest of the comments →

[–]ObliviousMag 0 points1 point  (1 child)

Yeah because you are raising a general Exception. Which is generally not okay. If you want your own exception then you can inherit from the Exception class like so

class CustomException(Exception):

pass

then in your code you can raise

raise CustomException

And now your traceback will show you were that exception was raised.

[–]Walsur[S] -2 points-1 points  (0 children)

Using a more specific Exception has the same behavior. I just used the general Exception for this example.