catch (err) -> err.message
Posted: Fri Sep 30, 2022 3:40 pm
Hi,
i have this code from documentation:
why do I get this error, when I use the line whit [err]?
I tried with err.message too
i have this code from documentation:
Code: Select all
try
{
dosomething
}
catch (err)
{
job.fail('PDF error: %1');
//job.fail('PDF error: %1', [err]); //grmpf err unknown
}
Code: Select all
michael@macpro seitenmelder % SwitchScriptTool --transpile .
Error: Failed to transpile the code: TypeScript failed with exit code 2
Error: TypeScript standard output: main.ts(36,42): error TS2322: Type 'unknown' is not assignable to type 'string | number | boolean'.