Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: set custom error class in AssertType #129

Open
ZeeD opened this issue May 9, 2022 · 0 comments
Open

feature request: set custom error class in AssertType #129

ZeeD opened this issue May 9, 2022 · 0 comments

Comments

@ZeeD
Copy link

ZeeD commented May 9, 2022

Hi.
I just found your project, witch is cool, and could let me avoid a lot of manual checks (I have a lot of class autogenerated by .proto files, and I wanted something to leverage the checks automatically) so, thanks for your project :)
I found the decorator @AssertType() very useful, but I was wondering if there is some way to let it know that it need to throws a custom Error, not TypeGuardError.
Moreover, as I'm not sure 100% on "how" it works, I didn't found an obvious way to wrap the decorator in a try { ... } catch { ... } block to convert the error itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant