Skip to content

Commit

Permalink
Lot inlined
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Aug 23, 2024
1 parent 3b2640a commit f7f3aaf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/XNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ export default class XNode {
const a = this.attributes ?? {};
const { failed, throwOnFail = true} = a;
let result;
if (this.log) {
console.log(`Executing ${this.name.name} at ${this.attributes?.location}`);
if (this.attributes) {
console.log(this.attributes);
}
}
try {
result = await this.___invoke(a);
if (this.log) {
console.log(`Executed ${this.name.name} at ${this.attributes?.location}`);
}
} catch (error) {
failed?.(error);
if (this.log) {
console.log(`failed ${this.name.name} at ${this.attributes?.location}`);
}
if (throwOnFail) {
throw new (Error as any)(`Failed ${this.name.name} on ${this.attributes?.location}`, { cause: error });
}
Expand Down

0 comments on commit f7f3aaf

Please sign in to comment.