On 1/29/13, Vladimir Panteleev <vladi...@thecybershadow.net> wrote: > foreach (lineNumber, line; lines) > try > numbers ~= to!int(line); > catch (Exception e) > throw new Exception(format("Error on line %d: %s", > lineNumber, e.msg)); > > Of course, this has the problem that all information (except the > message) from the original exception is lost.
What I'd do is: catch (Exception e) { e.msg = format("My info here...\n%s", e.msg); throw e; }