General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
xybersurfer
Amichai Mantinband
comments
Comments by "xybersurfer" (@xybersurfer) on "Amichai Mantinband" channel.
Previous
1
Next
...
All
@TazG2000 why do you think there is a guarantee that a program operating on a list should be able to handle or ignore bad data? i kind of agree with the low impact on performance. i think that the distinction between validations and exceptions is a bit blurry, because they seem like overlapping concepts.
2
i strongly disagree. it's bad to assume that you can immediately handle the situation. this typically the case when the same code is called for multiple purposes, in which case only the caller knows how to handle that situation, and the place to handle it could be several calls up the stack. if you throw an Exception, then the error will propagate up the stack until it is caught. but if you manually pass an Error Value, then: - you have to check it and pass all the way up the stack on every level - and you will eventually forgot to check a return value (the c# compiler won't remind you) - and your code will be mostly error handling instead of actually doing something, making it hard to read with Exceptions you just have to be always be ready for any call to throw an Exceptions, it's similar to your point 2.
1
any tips on how to do global error handling in Blazor? ErrorBoundary doesn't seem to catch everything
1
whether to use exceptions for validation, i think depends on the case. there basically 2 closely related considerations: performance and ergonomics (whether you need to collect multiple validation errors). i think that using exceptions for validation errors, can typically be used in programs that run unattended.
1
Previous
1
Next
...
All