www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Format of exceptions / errors: Exception sourceLocation(lineNumber)

reply Andre Pany <andre s-e-a-p.de> writes:
Hi,

in Visual Studio Code terminal view, you can click on anything 
which looks like
a file location and the file is opened at the specified line 
number.

While this is working fine with the lines in the stacktrace 
generated by DMD,
it doesn't work for the very first line:

core.exception.AssertError source/dt/concom/operator.d(43): 
Factory function dt.a.factory.create_processor not registered
----------------
??:? _d_assert_msg [0x7fb27ea8396a]
source/dt/concom/operator.d:44 dt.concom.operator.Operator 
dt.concom.operator.Operator.__ctor(std.json.JSONValue) 
[0x7fb27e89d1dd]

Here we have the format "Exception sourceLocation(lineNumber): 
Text". The "Exception "
breaks the forward navigation.

What do you think, should we as MS to support the "Exception " 
format? Or should we change
the output on our side?

https://github.com/dlang/druntime/blob/master/src/object.d#L1914

Kind regards
André
Mar 27
parent reply WebFreak001 <d.forum webfreak.org> writes:
On Friday, 27 March 2020 at 08:28:23 UTC, Andre Pany wrote:
 Hi,

 in Visual Studio Code terminal view, you can click on anything 
 which looks like
 a file location and the file is opened at the specified line 
 number.

 [...]
MS should support it see https://github.com/microsoft/vscode/issues/91290
Mar 27
parent Andre Pany <andre s-e-a-p.de> writes:
On Friday, 27 March 2020 at 08:46:34 UTC, WebFreak001 wrote:
 On Friday, 27 March 2020 at 08:28:23 UTC, Andre Pany wrote:
 Hi,

 in Visual Studio Code terminal view, you can click on anything 
 which looks like
 a file location and the file is opened at the specified line 
 number.

 [...]
MS should support it see https://github.com/microsoft/vscode/issues/91290
Fantastic, thanks a lot for the info. Kind regards Andre
Mar 27