Documentation ¶
Index ¶
- Variables
- func CheckErr(err error)
- func NewF(t *errorx.Type, format string, args ...interface{}) *errorx.Error
- func SafeWrap(t *errorx.Type, err error, message string, args ...interface{}) *errorx.Error
- func SafeWrapF(t *errorx.Type, err error, format string, args ...interface{}) *errorx.Error
- func WrapF(t *errorx.Type, err error, format string, args ...interface{}) *errorx.Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ApiErrors = errorx.NewNamespace("api")
View Source
var AssetErrors = errorx.NewNamespace("asset")
View Source
var CannotAddWorkFunctionToCronSchedulerError = DaemonErrors.NewType("cannot_add_work_function_to_cron_scheduler", fatalTrait)
View Source
var CannotApplyTemplateError = DaemonErrors.NewType("cannot_apply_template", fatalTrait)
View Source
var CannotCloseFileError = FileSystemErrors.NewType("cannot_close_file", fatalTrait)
View Source
var CannotCreateDirectoryError = FileSystemErrors.NewType("cannot_create_directory", fatalTrait)
View Source
var CannotCreateFileError = FileSystemErrors.NewType("cannot_create_file", fatalTrait)
View Source
var CannotCreateSSHServerError = SSHErrors.NewType("cannot_create_ssh_server", fatalTrait)
View Source
var CannotFindDefinitionError = ApiErrors.NewType("cannot_find_definition")
View Source
var CannotFindReportError = ApiErrors.NewType("cannot_find_report")
View Source
var CannotFindReportFile = FileSystemErrors.NewType("cannot_find_report_file", fatalTrait)
View Source
var CannotGetFlagValueError = CliErrors.NewType("cannot_get_flag_value", fatalTrait)
View Source
var CannotGetProcessInfoError = DaemonErrors.NewType("cannot_get_process_info", fatalTrait)
View Source
var CannotLoadAssetError = AssetErrors.NewType("cannot_load_asset", fatalTrait)
View Source
var CannotLockFileError = FileSystemErrors.NewType("cannot_lock_file", fatalTrait)
View Source
var CannotParseDataError = DaemonErrors.NewType("cannot_parse_data", fatalTrait)
View Source
var CannotParseDefinitionFileError = FileSystemErrors.NewType("cannot_parse_definition_file", fatalTrait)
View Source
var CannotReadDirectoryError = FileSystemErrors.NewType("cannot_read_directory", fatalTrait)
View Source
var CannotReadFileError = FileSystemErrors.NewType("cannot_read_file", fatalTrait)
View Source
var CannotReadInConfigError = CliErrors.NewType("cannot_read_in_config", fatalTrait)
View Source
var CannotReadLockFileError = FileSystemErrors.NewType("cannot_read_lock_file", fatalTrait)
View Source
var CannotRegisterCompletionFunction = CliErrors.NewType("cannot_register_comp_func")
View Source
var CannotReloadDaemonError = DaemonErrors.NewType("cannot_reload_daemon")
View Source
var CannotRemoveFileError = FileSystemErrors.NewType("cannot_remove_file", fatalTrait)
View Source
var CannotRequestDataError = DaemonErrors.NewType("cannot_request_data")
View Source
var CannotSendSignalError = DaemonErrors.NewType("cannot_send_signal")
View Source
var CannotSerializeItemError = ValidationErrors.NewType("cannot_serialize_item", fatalTrait)
View Source
var CannotStopApiServiceError = ApiErrors.NewType("cannot_stop_api_service")
View Source
var CannotStopSSHServerError = SSHErrors.NewType("cannot_stop_ssh_server")
View Source
var CannotUnlockFileError = FileSystemErrors.NewType("cannot_unlock_file", fatalTrait)
View Source
var CannotUnmarshalReportFileError = ValidationErrors.NewType("cannot_unmarshal_report_file", fatalTrait)
View Source
var CannotUpgradeWebsocketError = ApiErrors.NewType("cannot_upgrade_websocket", fatalTrait)
View Source
var CannotWriteConfigError = FileSystemErrors.NewType("cannot_write_config", fatalTrait)
View Source
var CannotWriteFileError = FileSystemErrors.NewType("cannot_write_file", fatalTrait)
View Source
var CannotWriteWebsocketError = ApiErrors.NewType("cannot_write_websocket")
View Source
var CliErrors = errorx.NewNamespace("cli")
View Source
var DaemonErrors = errorx.NewNamespace("daemon")
View Source
var DaemonNotRunningError = DaemonErrors.NewType("daemon_not_running")
View Source
var DefinitionAlreadyExistsError = ApiErrors.NewType("definition_already_exists")
View Source
var DuplicateDefinitionError = DaemonErrors.NewType("duplicate_definition", fatalTrait)
View Source
var ExternalValidatorParseError = ValidationErrors.NewType("external_validator_parse_error", fatalTrait)
View Source
var FileNotFoundError = FileSystemErrors.NewType("file_not_found", fatalTrait)
View Source
var FileSystemErrors = errorx.NewNamespace("filesystem")
View Source
var IdRequiredError = ApiErrors.NewType("id_required")
View Source
var InvalidWhereClauseError = ApiErrors.NewType("invalid_where_clause")
View Source
var LoginError = ApiErrors.NewType("login_error")
View Source
var ModelError = TuiErrors.NewType("model_error", fatalTrait)
View Source
var NameRequiredError = ApiErrors.NewType("name_required")
View Source
var NotifyError = TuiErrors.NewType("notify_error", fatalTrait)
View Source
var SSHErrors = errorx.NewNamespace("ssh")
View Source
var TokenError = ApiErrors.NewType("token_error")
View Source
var TuiErrors = errorx.NewNamespace("tui")
View Source
var UnknownError = TuiErrors.NewType("unknown_error", fatalTrait)
View Source
var UnknownExportFormatError = CliErrors.NewType("unknown_report", fatalTrait)
View Source
var UnknownFormatError = DaemonErrors.NewType("unknown_format", fatalTrait)
View Source
var UnknownReportError = CliErrors.NewType("unknown_report", fatalTrait)
View Source
var UserAlreadyExistsError = ApiErrors.NewType("user_already_exists", fatalTrait)
View Source
var ValidationError = ValidationErrors.NewType("validation_error")
View Source
var ValidationErrors = errorx.NewNamespace("validation")
View Source
var VariableValueLengthMismatchError = ValidationErrors.NewType("variable_value_length_mismatch", fatalTrait)
View Source
var WatcherError = TuiErrors.NewType("watcher_error", fatalTrait)
Functions ¶
func CheckErr ¶
func CheckErr(err error)
CheckErr is a helper function that handles a given error. If the error is not nil it logs the error and exits with code 1. This function should only be used in the top level scope of the program or when an error cant be returned
func NewF ¶
NewF is a helper function that allows to create a new *errorx.Error of the given type with a formatted message
func SafeWrap ¶
SafeWrap is a helper function to wrap an existing error. The function returns nil if the error is nil or a new error of the given type wrapping the given error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.