Skip to content

Cannot use default TraceListener on .Net Runtime as it throws Null pointers #2893

@Marti2203

Description

@Marti2203

Code Generation Target : C# 4.8.0 Runtime
Hello, today I tried to do a simple tracing of a grammar and I constantly got NullReferenceExceptions. After poking around in the code for the TraceListener, I see that it has two constructors - one that accepts a parser and one that accepts a Text Writer as an output, but never both... This implies that I have to either make my own Trace Listener which does exactly the same thing as the default one or use reflection to set a private readonly field as both the output TextWriter and Parser are such.
Here is the code for the TraceListener

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions