dproto icon indicating copy to clipboard operation
dproto copied to clipboard

no context shown on DProtoSyntaxException => should show line number

Open timotheecour opened this issue 7 years ago • 3 comments

@msoucy I have a large proto file, and get this error:

~/.dub/packages/dproto-2.1.1/dproto/import/dproto/parse.d(511,11): Error: uncaught CTFE exception dproto.exception.DProtoSyntaxException("Expected an integer but was ``")

it should show offending line number otherwise really hard to fix

timotheecour avatar May 15 '17 18:05 timotheecour

Started on the error-lines branch (4cca795778af442038057e17cef569bebbd50f17)... It fixes scenarios where it's being run for just the string processing, but doesn't yet handle extracting the information from CTFE exceptions.

msoucy avatar May 18 '17 01:05 msoucy

@msoucy also, is showing the contents of the entire proto necessary? if we had file:line i think showing file:line contents[line] would be enough

timotheecour avatar May 23 '17 21:05 timotheecour

So the reason that it displays the contents, is that it's not currently being caught so it's dumping the raw exception. I'll look into it

msoucy avatar May 26 '17 00:05 msoucy