C# Class withSIX.Core.Presentation.Services.DefaultExceptionHandler

Inheritance: IExceptionHandler
Datei anzeigen Open project: SIXNetworks/withSIX.Desktop

Public Methods

Method Description
HandleException ( Exception ex, string action = "Action" ) : UserErrorModel
TryExecuteAction ( Func action, string message = null ) : Task

Protected Methods

Method Description
DefaultExceptionHandler ( IEnumerable ehs ) : System
GetHumanReadableActionName ( string action ) : string
Handle ( ChecksumException ex, string action ) : UserErrorModel
Handle ( CompressedFileException ex, string action ) : UserErrorModel
Handle ( Exception ex, string action ) : UserErrorModel
Handle ( HttpRequestException ex ) : UserErrorModel
Handle ( OperationCanceledException ex, string action ) : UserErrorModel
Handle ( RepositoryLockException ex, string action ) : UserErrorModel
Handle ( SQLiteException ex, string action ) : UserErrorModel
Handle ( UnauthorizedAccessException ex, string action ) : UserErrorModel
HandleExceptionInternal ( Exception ex, string action = "Action" ) : UserErrorModel
UnwrapExceptionIfNeeded ( Exception ex ) : Exception

Private Methods

Method Description
HandleCorruptionException ( Exception ex, string action ) : UserErrorModel

Method Details

DefaultExceptionHandler() protected method

protected DefaultExceptionHandler ( IEnumerable ehs ) : System
ehs IEnumerable
return System

GetHumanReadableActionName() protected static method

protected static GetHumanReadableActionName ( string action ) : string
action string
return string

Handle() protected static method

protected static Handle ( ChecksumException ex, string action ) : UserErrorModel
ex withSIX.Sync.Core.Repositories.Internals.ChecksumException
action string
return withSIX.Core.Applications.Errors.UserErrorModel

Handle() protected static method

protected static Handle ( CompressedFileException ex, string action ) : UserErrorModel
ex CompressedFileException
action string
return withSIX.Core.Applications.Errors.UserErrorModel

Handle() protected static method

protected static Handle ( Exception ex, string action ) : UserErrorModel
ex System.Exception
action string
return withSIX.Core.Applications.Errors.UserErrorModel

Handle() protected static method

protected static Handle ( HttpRequestException ex ) : UserErrorModel
ex System.Net.Http.HttpRequestException
return withSIX.Core.Applications.Errors.UserErrorModel

Handle() protected static method

protected static Handle ( OperationCanceledException ex, string action ) : UserErrorModel
ex System.OperationCanceledException
action string
return withSIX.Core.Applications.Errors.UserErrorModel

Handle() protected static method

protected static Handle ( RepositoryLockException ex, string action ) : UserErrorModel
ex RepositoryLockException
action string
return withSIX.Core.Applications.Errors.UserErrorModel

Handle() protected static method

protected static Handle ( SQLiteException ex, string action ) : UserErrorModel
ex SQLiteException
action string
return withSIX.Core.Applications.Errors.UserErrorModel

Handle() protected static method

protected static Handle ( UnauthorizedAccessException ex, string action ) : UserErrorModel
ex System.UnauthorizedAccessException
action string
return withSIX.Core.Applications.Errors.UserErrorModel

HandleException() public method

public HandleException ( Exception ex, string action = "Action" ) : UserErrorModel
ex System.Exception
action string
return withSIX.Core.Applications.Errors.UserErrorModel

HandleExceptionInternal() protected method

protected HandleExceptionInternal ( Exception ex, string action = "Action" ) : UserErrorModel
ex System.Exception
action string
return withSIX.Core.Applications.Errors.UserErrorModel

TryExecuteAction() public method

public TryExecuteAction ( Func action, string message = null ) : Task
action Func
message string
return Task

UnwrapExceptionIfNeeded() protected static method

protected static UnwrapExceptionIfNeeded ( Exception ex ) : Exception
ex System.Exception
return System.Exception