You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ErrData[1][0] -- the position information when first calling 'As'
51
-
ErrData[1][1:] -- the args when first calling 'As'
48
+
["error code", ["runtime stack of New"], ["runtime stack of As", "args of As"...]]
49
+
the first one is error code, the second is New, the others are As's called.
52
50
```
53
51
54
52
55
53
### Error handling suggestions
56
-
57
-
*) Prioritize handling errors before handling normal logic, as errors are less likely to be ignored and make the program more robust;
58
-
*) Unless the error handling result is clearly defined, errors should always be returned to the caller;
59
-
*) If it is not possible to return to the caller, user prompts or logs should be provided instead of discarding errors to fully understand what has happened in the program;
60
-
*) Normal logic should not be written in if conditions to ensure good text indentation and reading of the code;
54
+
* Prioritize handling errors before handling normal logic, where errors are less likely to be ignored and make the program more robust;
55
+
* Unless the internal handling result of the error is specified, the error should be returned to the caller;
56
+
* If there is no need to return to the caller, a log should be recorded instead of discarding the error
57
+
* Normal logic should be avoided from being placed in 'if' as much as possible for easier indentation reading.
0 commit comments