You shouldn't need error types

Please add custom error types.

image

Can you give an example usecase for this? I don't see much of a reason for it.

adding specificity to errors

I feel like error messages in snap are fine the way they are. For example, "expecting a list but getting a text" is clear without putting it in a category. I feel like the actual message is a lot more useful than error types (or categories).

Unless you can show an actual example of how this is useful, then maybe you can convince me. But for what you have said so far doesn't convince me at all (and I have a feeling the snap devs might agree with me).

I'm pretty sure they're asking to replace "Hmmm..." with something else, aka, error types (like TypeError)

yep, plus having error types would be a really nice feature for js devs

pr incoming Error types for jsdevs by YeesterPlus Ā· Pull Request #3450 Ā· jmoenig/Snap Ā· GitHub

Just being a nice feature is not a good reason for something to exist (and to convince me). How is this useful? Show and example of it in action and why it's needed there. You have yet to convince me that what snap already has isn't good enough.





the export project thing comes from it capturing the screenshot firefox shortcut

Having been burned a few times by bad code, Jens is generally unsympathetic to unsolicited PRs from users. IANJ, and you might get lucky, but just warning you. Don't take it personally.

why not just use JS func blocks?

I agree with this.

you can't use them without js functions being on

jens said no

again, why do you really want this. the only reason you cited was for JS devs, but if you are a JS dev, just turn JS on! why not?

lots of programming languages have typed errors, I want it not just for js programmers but, for all programmers

right, and just turn js on.

Yes, lots of programming languages have it, but that doesn't mean snap has to have it. The developers have decided that it's not needed for snap, because just the error message gets the idea across. We don't need categories to understand what the error is, that's what the error message is for.

whynot having the error types in just the trycatch(because Snap! uses js)