public constructor(message: string, task: Task<any, any>, originalError?: Error) {
    super(message);
    Error.captureStackTrace(this, TaskError);
    this.name = this.constructor.name;