Clearing DisplayCancelableProgressBar after an error

How can I catch unity errors and clear the CancelableProgressBar in the catch ?

What is the equivalent of class Exception in Unity that will catch all errors?

Old question, but if anyone is search solution, you can add command to Menu bar, it’s allowed to use it when cancelable progress bar is on screen.

            [MenuItem("Help/Clear Progress Bar")]
            public static void ClearProgressBar()