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

better exception handing #26

Open
salva-imm opened this issue Oct 10, 2021 · 2 comments
Open

better exception handing #26

salva-imm opened this issue Oct 10, 2021 · 2 comments

Comments

@salva-imm
Copy link

Hey
i wonder if there's way to just throw better exception , with field/type name

example:

type Entry1 = object
  username: string
  password: string

serializing this: "username":true it just tells me : e: Expected " but got t instead. At offset: 17
expected result: Wrong type: username should be string
obviously I don't want to check everything manually..

@treeform
Copy link
Owner

treeform commented Nov 4, 2021

I would like better exception handler. But to produce nicer errors more state needs to be passed around. That will sacrifice speed though, I don't want to sacrifice speed.

@SolitudeSF
Copy link
Contributor

maybe better exceptions could only be enabled in debug mode?

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

3 participants