Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Nov 9, 2024
1 parent 560c519 commit e025296
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/lib/eventManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@ export class EventManager {
// deep equality check to see if it's been changed. Normally the
// filter objects should be relatively small so there shouldn't be
// much of a performance hit.
const newOutput = await listener(output);
let newOutput = null;
try {
newOutput = await listener(output);
} catch (error) {
error.message = `Error in listener when calling: ${filterName}: ${error.message}`;
throw error;
}

// Plugin didn't return anything - so we leave the object as it is.
if (newOutput === undefined) continue;
Expand Down

0 comments on commit e025296

Please sign in to comment.