|
Well, if my English and the documentation didn't work for you, maybe the code will?
class Program
{
static void Main(string[] args)
{
Do(() => M(null, "one"));
Do(() => M(() => M(() => M(null, "three"), "two"), "one"));
Console.ReadLine();
}
static void M(Action a, string err)
{
try { if (a != null) a(); }
catch (Exception e) { throw new Exception(err, e); }
throw new Exception(err);
}
static void Do(Action a)
{
try
{
a();
Console.WriteLine("All Good");
}
catch(Exception e)
{
var @base = e.GetBaseException();
var top = e;
while (top.InnerException != null)
top = top.InnerException;
Console.WriteLine("Exceptions!\t e == base {0}, top == base {1}", e == @base, top == @base);
}
}
}
|
|
|
|
|
I know what it does, but the point is to log all the exceptions, not just the first and last.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Oh well, it was not apparent in your example that you wanted to log all intermediary exceptions...
Arguably it's not really necessary either, what do these intermediary exception tell you that you need to fix?
|
|
|
|
|
In fact logging isn't as inportant as visiting, for whatever reason, logging is just one reason. And the intermediate exceptions may have things in their Data collections that the end ones don't have. You'll never know unless you visit them all.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
HO, I see....
I used this Data collection once, myself! ^^
(this was the only time I saw something in it!! )
|
|
|
|
|
That's nothing. I do it with an if and a goto .
/ravi
|
|
|
|
|
Why bother when you can do:
On Error Resume Next
|
|
|
|
|
There are some amazing video snippets from around the world.........there are also a number of different video effects/techniques that have been applied to spectacular ends.
I've said enough......just sit back and enjoy.
https://www.youtube.com/watch?v=Tt4QjHdT3lU[^]
|
|
|
|
|
When I spotted this on the homepage of CP I was convinced it would be some muscle enhancement BS lol, but cool video
|
|
|
|
|
Awesome video, powerful music; is there any way to get rid of the dreadful vocals that destroy the whole thing?
Will Rogers never met me.
|
|
|
|
|
|
It wasn't me!
I was miles away at the time (and I have witnesses to prove it, copper!)
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
yoyo, boyo!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
No, it dosnt work, I haven't gotten any phone call; but the auto reply seem to work nicely.
|
|
|
|
|
I was completely on the opposite side of the field. I was nowhere near the cottage. Not that it was a cottage - it was a river. But, then, I wouldn't know, of course, because I wasn't there.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Quote: The app, which took eight hours to create
I think I may have spotted why the application security isn't all it could be...
|
|
|
|
|
I'm just surprised it took them that long. Clearly testing time was pretty short...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Testing? We do frAGILE here.
|
|
|
|
|
It's.... It's an app that sends "Yo" to people, with hundreds of thousands of users and a million dollars of funding...
Ok, folks. That's it, then. The human race has now officially jumped the shark. Time to pack up our ball and go home. Someone call NORAD.
|
|
|
|
|
Quote: Someone call NORAD.
You mean the Norwegian government organization for developing countries? NORAD[^]
|
|
|
|
|
Kenneth Haugland wrote: Norwegian government organization for developing countries
Are they responsible for Wisconsin?
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
I lost the logic/joke now I think...
|
|
|
|
|
Display Name Taken wrote: who hacked
The butler did it.
|
|
|
|
|
It was Professor Plum, in the Library, with the Lead Pipe!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|