feat: aspect执行错误打印error log

This commit is contained in:
Pan Qiancheng 2025-11-06 11:35:53 +08:00
parent 713526ce26
commit 4c1e55982c
2 changed files with 2 additions and 0 deletions

View File

@ -172,6 +172,7 @@ class AppLoader extends types_1.AppLoader {
}; };
} }
catch (err) { catch (err) {
console.error(`执行aspect「${name}」出错`, err);
await context.rollback(); await context.rollback();
if (err instanceof types_1.OakException) { if (err instanceof types_1.OakException) {
throw err; throw err;

View File

@ -221,6 +221,7 @@ export class AppLoader<ED extends EntityDict & BaseEntityDict, Cxt extends Backe
}; };
} }
catch (err) { catch (err) {
console.error(`执行aspect「${name}」出错`, err);
await context.rollback(); await context.rollback();
if (err instanceof OakException) { if (err instanceof OakException) {
throw err; throw err;