Socket
Socket
Sign inDemoInstall

cosmossdk.io/errors

Package Overview
Dependencies
14
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cosmossdk.io/errors

Package errors implements custom error interfaces for cosmos-sdk. Error declarations should be generic and cover broad range of cases. Each returned error instance can wrap a generic error declaration to provide more details. This package provides a broad range of errors declared that fits all common cases. If an error is very specific for an extension it can be registered outside of the errors package. If it will be needed my many extensions, please consider registering it in the errors package. To create a new error instance use Register function. You must provide a unique, non zero error code and a short description, for example: When returning an error, you can attach to it an additional context information by using Wrap function, for example: The first time an error instance is wrapped a stacktrace is attached as well. Stacktrace information can be printed using %+v and %v formats.


Version published

FAQs

Last updated on 10 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc