Documentation
¶
Index ¶
- func Do()
- func RegistryAsyncHandlers(handlers ...AsyncHandler)
- func RegistryHandlers(handlers ...Handler)
- type AsyncHandler
- type Builder
- func On(err **stderrs.Error) Builder
- func OnError(err *error) Builder
- func SetMessage(message string) Builder
- func WithAsyncHandlers(handlers ...AsyncHandler) Builder
- func WithAsyncHandlersIf(condition bool, handlers ...AsyncHandler) Builder
- func WithField(key string, value any) Builder
- func WithFieldIf(condition bool, key string, value any) Builder
- func WithFields(fields map[string]any) Builder
- func WithFieldsIf(condition bool, fields map[string]any) Builder
- func WithHandlers(handlers ...Handler) Builder
- func WithHandlersIf(condition bool, handlers ...Handler) Builder
- func WithoutHandlers() Builder
- func (b Builder) Do()
- func (b Builder) On(err **stderrs.Error) Builder
- func (b Builder) OnError(err *error) Builder
- func (b Builder) SetMessage(message string) Builder
- func (b Builder) WithAsyncHandlers(handlers ...AsyncHandler) Builder
- func (b Builder) WithAsyncHandlersIf(condition bool, handlers ...AsyncHandler) Builder
- func (b Builder) WithField(key string, value any) Builder
- func (b Builder) WithFieldIf(condition bool, key string, value any) Builder
- func (b Builder) WithFields(fields map[string]any) Builder
- func (b Builder) WithFieldsIf(condition bool, fields map[string]any) Builder
- func (b Builder) WithHandlers(handlers ...Handler) Builder
- func (b Builder) WithHandlersIf(condition bool, handlers ...Handler) Builder
- func (b Builder) WithoutHandlers() Builder
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegistryAsyncHandlers ¶
func RegistryAsyncHandlers(handlers ...AsyncHandler)
RegistryAsyncHandlers - add handlers for global async execution.
func RegistryHandlers ¶
func RegistryHandlers(handlers ...Handler)
RegistryHandlers - add handlers for global execution.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder - panic builder.
func SetMessage ¶
SetMessage - set message for standard error.
func WithAsyncHandlers ¶
func WithAsyncHandlers(handlers ...AsyncHandler) Builder
WithAsyncHandlers - add async exception handler.
func WithAsyncHandlersIf ¶
func WithAsyncHandlersIf(condition bool, handlers ...AsyncHandler) Builder
WithAsyncHandlersIf - add async exception handler if the condition is met.
func WithFieldIf ¶
WithFieldIf - Add a field to the target error if the condition is met.
func WithFields ¶
WithFields - add a fields to the target error.
func WithFieldsIf ¶
WithFieldsIf - Add a fields to the target error if the condition is met.
func WithHandlers ¶
WithHandlers - add exception handler.
func WithHandlersIf ¶
WithHandlersIf - add exception handler if the condition is met.
func WithoutHandlers ¶
func WithoutHandlers() Builder
WithoutHandlers - allows you to reset all handlers for the selected call.
func (Builder) Do ¶
func (b Builder) Do()
Do - perform panic processing with context. Called exclusively via defer.
func (Builder) SetMessage ¶
SetMessage - set message for standard error.
func (Builder) WithAsyncHandlers ¶
func (b Builder) WithAsyncHandlers(handlers ...AsyncHandler) Builder
WithAsyncHandlers - add async exception handler.
func (Builder) WithAsyncHandlersIf ¶
func (b Builder) WithAsyncHandlersIf(condition bool, handlers ...AsyncHandler) Builder
WithAsyncHandlersIf - add async exception handler if the condition is met.
func (Builder) WithFieldIf ¶
WithFieldIf - Add a field to the target error if the condition is met.
func (Builder) WithFields ¶
WithFields - add a fields to the target error.
func (Builder) WithFieldsIf ¶
WithFieldsIf - Add a fields to the target error if the condition is met.
func (Builder) WithHandlers ¶
WithHandlers - add exception handler.
func (Builder) WithHandlersIf ¶
WithHandlersIf - add exception handler if the condition is met.
func (Builder) WithoutHandlers ¶
WithoutHandlers - allows you to reset all handlers for the selected call.