Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@kamkam1_0/errorhandler
Advanced tools
ErrorHandler is simple to use module that allows you to handle several errors to prevent your program from crashing
ErrorHandler is simple to use module that allows you to handle several errors to prevent your program from crashing
npm install @kamkam1_0/errorhandler
Here are the error types supported by ErrorHandler
rejectionHandled
uncaughtException
uncaughtExceptionMonitor
unhandledRejection
const ErrorHandler = require("@kamkam1_0/errorhandler")
ErrorHandler.deploy()
You can also select one or more specific error types to deploy them
const ErrorHandler = require("@kamkam1_0/errorhandler")
process.on("rejectionHandled", err => ErrorHandler.rejectionHandled(err))
One of the feature is also the capacity to send the error. You can do that by creating a function to do that.
let sendingFunction = function(err){
//Your code to send
//For Example with discord:
bot.users.get("YOUR ID").send(`An error happened: \`\`\`${err}\`\`\``)
}
const ErrorHandler = require("@kamkam1_0/errorhandler")
process.on("rejectionHandled", err => ErrorHandler.rejectionHandled(err, undefined, undefined, sendingFunction))
//OR
ErrorHandler.deploy(sendingFunction)
You can choose to create a file for every error or not (default is true). You can also choose to log or not the error (default is true)
const ErrorHandler = require("@kamkam1_0/errorhandler")
process.on("rejectionHandled", err => ErrorHandler.rejectionHandled(error, logError, createFile, callbackFunction))
//OR
ErrorHandler.deploy(callbackFunction, logError, createFile)
FAQs
ErrorHandler is simple to use module that allows you to handle several errors to prevent your program from crashing
The npm package @kamkam1_0/errorhandler receives a total of 1 weekly downloads. As such, @kamkam1_0/errorhandler popularity was classified as not popular.
We found that @kamkam1_0/errorhandler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.