CodePudding user response:
,,,,,, yesTo handle exceptions, of course, global handle exceptions, but you can not try catch every place
CodePudding user response:
You ask is not technical problem, this is a system need not1000 client often error, for example, your leadership is in the middle of the complaints and angry in the morning, let you troubleshoot problems, said "must solve, overtime has to solve, not solve everyone mustn't come home, to I live in the company"
Here's the thing, please tell me where is the mistake? What happen? What condition happened, we how to reappear this error?
You ignore him, there is no record, you also don't know how this error emersion, programmers know that problem, we don't bother error, we bother you tell me the mistake, I test hundreds times repetition can't he
CodePudding user response:
Don't write the try.. Catch the code is more confident in yourself,CodePudding user response:
Just like before you send the code, this is the reason for obviously,Wrong, be complaints, and must be solved, not solve buckles money
ok? What's wrong? I don't know
Anyway, I don't know, I need to change anyway? How to change, how to optimize? Asynchronous, thread, brush, also not line? Add ngnix shunt
So, you know I often against the blog garden, because these are blog tell you in the garden, as for, Don't know, because you don't know what is wrong, anyway, blog garden said ok, so it is so, as it happens, return true to ok
Ps: there is a problem in your code actually, anomaly is the default (T), then the problem is coming, are you really the default or abnormal?? Such as someone once asked me they often can't get the data and the upper according to the garden on a blog, the man finally found is actually the bottom ate anomaly (originally is a problem of the bottom, but you eat, the above screening various optimizing for a few months, there is no effect)
CodePudding user response:
The complexity of the function is necessary, see,To make it easier to find the problem, and personalized handle exceptions,
A certain level in the call, may need to encapsulate the catch the exception, and then throw to the outside,
Such as: direct database access layer which table can be according to the current access methods, such as the record about the specific information, thrown to the business layer, business layer to record this is which business, which implementation module, etc., and then threw the WCF implementation layer, implementation layer organization information structure, oneself's record run log, and returned to the client,
The client according to the information displayed on the interface once more "professional" error message,
Client in the client take a photo to you, you know where is wrong, according to the key information
Of course this is admirable
CodePudding user response: