Skip to content

Commit

Permalink
add error example to job handler generator
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Apr 24, 2024
1 parent 7901d2b commit a770cd5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ving/generator/jobhandler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default async function (job) {
const records = await ving.useKind('SomeRecord');
const record = await records.findOrDie(job.data.id);
// do something
// throw ving.ouch(500, 'Some error');
ving.log('jobs').info(\`SomeRecord \${job.data.id} did something.\`);
return true;
}`;
Expand Down

0 comments on commit a770cd5

Please sign in to comment.