Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/ppc-games/ppcerrors

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ppc-games/ppcerrors

  • v0.1.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

ppcerrors

This library is designed to meet the specific error-handling needs of PPC Studio projects. It offers the following features:

  • Contextual Error Wrapping: Wrap errors with additional contextual information, such as appending the user ID of the API request initiator when an error occurs.
  • Error Identification: Use the HasDefinition function to compare errors against predefined definitions. Once an error is wrapped with a definition, it can be identified regardless of how many times it is subsequently wrapped.
  • Error Code Handling: Append error codes to errors for easy identification by external systems. Use the HasErrorCode function to detect errors wrapped with specific error codes.
  • Error Normalization: Normalize different errors (e.g., error A and error B) by wrapping them into the same error (e.g., error C) while preserving the original information of the initial errors. This is useful when errors A and B need to be treated as the same category of error.
  • Detailed Error Reporting: Record the function name, file name, and line number where the error occurred, and output easy-to-read error reports using built-in print methods. This ensures clear and informative error messages.
  • Efficient Error Stack Printing: Print the error stack only once, even when the original error is wrapped multiple times.

FAQs

Package last updated on 18 May 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc