On Thursday, May 24, 2018 19:39:07 Jacob Carlborg via Digitalmars-d-learn
wrote:
> On 2018-05-24 08:05, Robert M. Münch wrote:
> > Hi, great! Thanks for the examples... BTW: Is there a place where such
> > generic and fundamental examples are collected?
>
> Not as far as I know.
>
> >> void
On 2018-05-24 08:05, Robert M. Münch wrote:
Hi, great! Thanks for the examples... BTW: Is there a place where such
generic and fundamental examples are collected?
Not as far as I know.
void handleException1(alias dg)()
{
try dg();
catch (Exception e) { /* handle exception */ }
}
On 2018-05-22 18:33:06 +, Jacob Carlborg said:
You can always create a function that takes a delegate or lambda and
handles the exception in the function. Here are three versions of the
same thing, depending on how you want the call site to look like.
Hi, great! Thanks for the
On Wednesday, May 23, 2018 04:07:25 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 05/23/2018 12:47 AM, Robert M. Münch wrote:
> > On 2018-05-22 18:34:34 +, Ali ‡ehreli said:
> >> An idiom known in C++ circles is a Lippincott function:
> >>
> >>
> >>
On 05/23/2018 12:47 AM, Robert M. Münch wrote:
On 2018-05-22 18:34:34 +, Ali ‡ehreli said:
An idiom known in C++ circles is a Lippincott function:
https://cppsecrets.blogspot.ca/2013/12/using-lippincott-function-for.html
Just wanted to mention that it can be a part of a clean
On 2018-05-22 18:34:34 +, Ali ehreli said:
An idiom known in C++ circles is a Lippincott function:
https://cppsecrets.blogspot.ca/2013/12/using-lippincott-function-for.html
Just wanted to mention that it can be a part of a clean solution.
Thanks, and I assume that D has the same
On Tuesday, 22 May 2018 at 18:20:43 UTC, Robert M. Münch wrote:
I see that I'm writing
try {
... different code ...
} catch (myException e) {
... same handling code ...
}
over and over again.
Of course I can put the exception handling code into a function
to not duplicate it.
On 05/22/2018 11:20 AM, Robert M. Münch wrote:
I see that I'm writing
try {
... different code ...
} catch (myException e) {
... same handling code ...
}
over and over again.
Of course I can put the exception handling code into a function to not
duplicate it. However, I still need to
On 2018-05-22 20:20, Robert M. Münch wrote:
I see that I'm writing
try {
... different code ...
} catch (myException e) {
... same handling code ...
}
over and over again.
Of course I can put the exception handling code into a function to not
duplicate it. However, I still need to write
I see that I'm writing
try {
... different code ...
} catch (myException e) {
... same handling code ...
}
over and over again.
Of course I can put the exception handling code into a function to not
duplicate it. However, I still need to write this construct over and
over again. Is
10 matches
Mail list logo