I've caught an exception!! Now what?

后端 未结 16 910
逝去的感伤
逝去的感伤 2021-02-02 05:15

I\'ve started using try-catch blocks (a bit late, I know!), but now I\'m not sure what to do with the exception once I\'ve caught it. What should I do?



        
16条回答
  •  别那么骄傲
    2021-02-02 05:36

    It depends entirely on context. Possible options include "Use default data instead of data from the database" and "Display an error message to the user".

提交回复
热议问题