I'm a Java developer and i'm really used to see when i forget to catch an exception, a message prompting on my IDE reminding me to do so.
Is there a similar thing on PyCharm for Django development?
Thanks a lot.
I'm a Java developer and i'm really used to see when i forget to catch an exception, a message prompting on my IDE reminding me to do so.
Is there a similar thing on PyCharm for Django development?
Thanks a lot.
Java and Python behave differently, so with Java you need to explicitly handle each exception with a throws
clause. This can be possible since Java is a statically typed language, and explicitly mentions exceptions.
Python on the on the other hand is dynamically typed, and so exception handling as to be handled by the user's discretion.
Sorry, but this feature just does not exist right now.
However, you can get PyCharm to pause on a runtime exception, by hitting the debug button instead os running it.
This comes from java's itself. Java methods have throws declaration but python methods has not. Ide handles this. Not sure but it seems not possible.