fix(tracker): add optional data in error
This commit is contained in:
parent
869a25169f
commit
8d919e49cc
2 changed files with 4 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ export enum WorkerActivityLogStatus {
|
|||
Off,
|
||||
Console,
|
||||
Error,
|
||||
ErrorWithData,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ self.onmessage = ({ data }: MessageEvent<WorkerMessageData>) => {
|
|||
case WorkerActivityLogStatus.Console:
|
||||
return console.error(msg, 'STATUS:', workerStatus, data)
|
||||
case WorkerActivityLogStatus.Error:
|
||||
throw new Error(`${msg} ----- STATUS: ${workerStatus} --- ${JSON.stringify(data)}`);
|
||||
throw new Error(`${msg} ----- STATUS: ${workerStatus}`);
|
||||
case WorkerActivityLogStatus.ErrorWithData:
|
||||
throw new Error(`${msg} ----- STATUS: ${workerStatus} --- ${JSON.stringify(data)}`)
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue