Checks if an exception is a cancellation exception
static bool isCancel(Object error) { return error is DownloadCancelledException; }