|
|
|
|
|
by kuschku
3423 days ago
|
|
> There's no point returning an error and letting the program try to recover, just blow up with as much information as you can, so the bug can be fixed. Well, imagine a game letting the user roll a dice. "Chose a number of sides for your dice". In such cases, handling such a panic might be useful. And knowing that it exists might be useful, too. If the language does not allow specifying a range of a type (for example, requiring all numbers passed into the RNG to be positive), then it should be specified in the API in other ways programmatically, so it can be statically analyzed. |
|