![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@poppinss/exception
Advanced tools
Create custom exceptions with error code, status, and the help description.
The @poppinss/exception
package provides with a base Exception
class that can be used to create custom errors with support for defining the error status, error code, and help description.
import { Exception } from '@poppinss/exception'
class ResourceNotFound extends Exception {
static code = 'E_RESOURCE_NOT_FOUND'
static status = 404
static message = 'Unable to find resource'
}
throw new ResourceNotFound()
You can also create an anonymous exception class using the createError
method. The return value is a class constructor that accepts an array of values to use for message interpolation.
The interpolation of error message is performed using the util.format
method.
import { createError } from '@poppinss/exception'
const E_RESOURCE_NOT_FOUND = createError<[number]>(
'Unable to find resource with id %d',
'E_RESOURCE_NOT_FOUND'
)
const id = 1
throw new E_RESOURCE_NOT_FOUND([id])
One of the primary goals of poppinss is to have a vibrant community of users and contributors who believes in the principles of the framework.
We encourage you to read the contribution guide before contributing to the framework.
In order to ensure that the poppinss community is welcoming to all, please review and abide by the Code of Conduct.
Poppinss exception is open-sourced software licensed under the MIT license.
FAQs
Utility to create custom exceptions
The npm package @poppinss/exception receives a total of 19,916 weekly downloads. As such, @poppinss/exception popularity was classified as popular.
We found that @poppinss/exception 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.