Ejemplo n.º 1
0
        private (string, string) HandleException(Exception e)
        {
            if (e is FlashException)
            {
                return("Error", "Unable to flash the SD Card");
            }

            if (e is TaskCanceledException)
            {
                operationContext.SetOperationAsCancelled();

                return("Operation cancelled", "The operation has been cancelled");
            }

            return(Resources.ErrorTitle, $"{e.Message}");
        }