RejectedSoftware Forums

Sign up

Enabling errorStackTraces

Naive attempt to enable stack trace printing:

    settings.options |= HTTPServerOption.errorStackTraces;

    // ...

    void error(HTTPServerRequest req, HTTPServerResponse res, HTTPServerErrorInfo err)
    {        
        res.writeBody(err.debugMessage);
    }

err.DebugMessage is empty though (Linux x86_64, vibe.d 0.7.21-alpha4)

Is it actually supposed to work? :)

Re: Enabling errorStackTraces

Ah I see, judging by the sources it simply uses exception.toString and expects trace to be there. Would you accept PR that prints a warning to the log if this option is enabled by toString returns empty string?

Re: Enabling errorStackTraces

Oh actually it is even more simple than that - it is just result of short-circuit for 404 Not Found path :) Nevermind : https://github.com/rejectedsoftware/vibe.d/pull/791