We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如图
参见源代码
修改前在new function函数体中只能这样使用
//!js return (async ()=>{ const result await query(); return result; })(); // 或 const asyncFunc = async () => { const result await query(); return result; } return asyncFunc();
修改后可以这样使用
return await query();
显然后者更简洁和优雅。
思源拦截了错误信息,既无抛出错误也无打印错误信息,只是返回了空数组,界面显示就是没匹配任何内容。
这个非常不友好,如果函数体内有语法错误,应该输出到控制台,这样开发起来更方便。
要想捕获错误,必须自己在代码中try{}catch(e){},如下,非常麻烦,尤其对小白用户,非常不友好。
//!js try{ return query("select `aa` as `aa__w80_c:blue_0`, `bb` from ?", [fromTable('20250110154352-pdr5v3t'),item]); } catch(e) { console.error(e) return []; }
嵌入块中的js支持异步函数,并且错误信息打印到控制台
No response
The text was updated successfully, but these errors were encountered:
Vanessa219
No branches or pull requests
In what scenarios do you need this feature?
如图
先说异步函数
参见源代码
修改前在new function函数体中只能这样使用
修改后可以这样使用
显然后者更简洁和优雅。
再说错误信息
参见源代码
思源拦截了错误信息,既无抛出错误也无打印错误信息,只是返回了空数组,界面显示就是没匹配任何内容。
这个非常不友好,如果函数体内有语法错误,应该输出到控制台,这样开发起来更方便。
要想捕获错误,必须自己在代码中try{}catch(e){},如下,非常麻烦,尤其对小白用户,非常不友好。
Describe the optimal solution
嵌入块中的js支持异步函数,并且错误信息打印到控制台
Describe the candidate solution
No response
Other information
No response
The text was updated successfully, but these errors were encountered: