Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-15 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: Why the hell do exceptions give error in the library rather than the user code? D exceptions can provide context in two ways: - Stack trace, for which you need to compile with debug symbols enabled (-g). - A file name and li

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-15 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 14 September 2018 at 16:40:01 UTC, Josphe Brigmo wrote: This is the only kind of error I get Compile with -g.

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 16:43:04 UTC, Josphe Brigmo wrote: It is because you are throwing inside your code. When the throw is from the library, it gives something like this: std.exception.ErrnoException@std/stdio.d(430): Cannot open file `/doesntexist' in mode `w' (Permission denied)

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
On Friday, 14 September 2018 at 15:52:20 UTC, Neia Neutuladh wrote: On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a li

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Josphe Brigmo via Digitalmars-d
On Friday, 14 September 2018 at 15:40:46 UTC, Jonathan Marler wrote: On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a l

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Neia Neutuladh via Digitalmars-d
On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a library which tells me absolutely nothing about where the error occurs

Re: Why the hell do exceptions give error in the library rather than the user code?

2018-09-14 Thread Jonathan Marler via Digitalmars-d
On Friday, 14 September 2018 at 14:34:36 UTC, Josphe Brigmo wrote: std.file.FileException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(3153): It is very annoying when the only error info I have is pointing to code in a library which tells me absolutely nothing about where the error occurs