Add WorkerException to allow serializing even when the trace contains closures (which are not serializable)