throw exception in try statement
https://stackoverflow.com/questions/47015693/how-to-fix-throw-of-exception-caught-locally
1 | function(){ |
when throw an exception in try statement, will show an warning:
1 | 'throw' of exception caught locally. This inspection reports any instances of JavaScript throw statements whose exceptions are always caught by containing try statements. Using throw statements as a "goto" to change the local flow of control is likely to be confusing. |
if this is a promise or async function, await is a kind of promise, u can return an reject.
1 | async function(name){ |
normally, packing this exception in an function
1 | function checkHandle(valid){ |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 AlMirai!