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 there a way to handle it more generic? Like:

??? (... code ...);

or

??? { ... code ...};

Where ??? would do the try and re-use the exception handling code everytime? I hope this is understandable.

--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

Reply via email to