On Monday, 2 October 2023 at 12:00:35 am UTC+11 Axel Wagner wrote:
On Sun, Oct 1, 2023 at 2:37 PM Jerry Londergaard
wrote:
I've been thinking about this point as well lately. I think I understand
(at least some of) the conditions under which
you would call a panic(), but I still don't quite
Axel Wagner, you opinin is highly appriciated.
niedziela, 1 października 2023 o 15:00:35 UTC+2 Axel Wagner napisał(a):
> On Sun, Oct 1, 2023 at 2:37 PM Jerry Londergaard
> wrote:
>
>> I've been thinking about this point as well lately. I think I understand
>> (at least some of) the conditions
On Sun, Oct 1, 2023 at 2:37 PM Jerry Londergaard
wrote:
> I've been thinking about this point as well lately. I think I understand
> (at least some of) the conditions under which
> you would call a panic(), but I still don't quite grok why it's better
> than returning an error if that error is
I've been thinking about this point as well lately. I think I understand
(at least some of) the conditions under which
you would call a panic(), but I still don't quite grok why it's better than
returning an error if that error is properly
handled. If I panic(), then no defer() statements will
Thank you mister Rader, this was what I needed. I think I now have
intuition what this text want to say.
Best regards
Kamil
piątek, 29 września 2023 o 23:58:39 UTC+2 Kurtis Rader napisał(a):
> An ordinary error is one that can be expected to occur. For example,
> opening a file may fail
An ordinary error is one that can be expected to occur. For example,
opening a file may fail because the file does not exist or the process
doesn't have permission to open it. An exceptional error is one that is not
expected to occur and often indicates the state of the program is invalid.
For
Hello,
In Go FAQ we read "We believe that coupling exceptions to a control
structure, as in the try-catch-finally idiom, results in convoluted code.
It also tends to encourage programmers to label too many ordinary errors,
such as failing to open a file, as exceptional.", " Go also has a