emperror v0.30.0 Release Notes

Release Date: 2020-01-13 // over 4 years ago
  • ➕ Added

    • ErrorHandler interface
    • ErrorHandlerContext interface
    • ErrorHandlerSet interface (combination of ErrorHandler and ErrorHandlerContext)
    • ErrorHandlers error handler list
    • ErrorHandlerFunc error handler function wrapper
    • ErrorHandlerContextFunc error handler function wrapper
    • NoopHandler no-op error handler
    • TestErrorHandler, TestErrorHandlerContext, TestErrorHandlerSet test error handlers

    🔄 Changed

    • ErrorMatcher is now a simple function type: func(err error) bool (Breaking change)
    • Error handlers created using composition (WithDetails, WithFilter) now return ErrorHandlerSet
    • ⚡️ Updated errors packages

    🗄 Deprecated

    • Handler interface. Use ErrorHandler instead.
    • ContextAwareHandler interface. Use ErrorHandlerContext instead.
    • Handlers error handler list. Use ErrorHandlers instead.
    • HandlerFunc error handler function wrapper. Use ErrorHandlerFunc instead.
    • Handle helper function. User ErrorHandler.Handle instead.
    • NewNoopHandler no-op error handler. Use NoopHandler instead.
    • 0️⃣ MakeContextAware error handler context wrapper. No replacement. (Error handlers are by default context aware)
    • TestHandler test error handler. Use TestErrorHandler instead.