KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was wondering how you guys handle functions fails. Do you raise an exception, or do you return an error message? e.G. I have a function that is supposed to connect to an external com-object. If the com-object has not been initiated through another program, the connection cannot be established. What would be the preferred python way of notifying the main program? Should I raise an exception with the detailed error message, or should I simple return the error message? Thanks!
Tags (comma-separated)
Save Edits
Cancel