New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify error tracing API #17
Comments
And we can get access to a "Grip.getProps"-like string by looking at Components.stack. It does bother me a little that the name "sysoutError" is so long, maybe we can instead go with just "TraceError.sysout" or "TraceError.error". |
It's just that sysout normally expects a label and an object. That's why I suggested another method (that can auto generate it). Is it really so long? It's like 5 more characters... Honza |
It's not that bad, it just bugs me slightly, and it's easier to change now. |
It bugs me also a bit. (anyway, we will be able to change it easily, so I'll start with TraceError.sysoutError(err)` until we all agree on a name) Florent |
Ok, I added it to the agenda. |
Thinking of it, we could just test Florent |
Yep, I like the idea. Honza |
The first post is updated according to what has been said in the thread. @aliuk2012 is working on it. Florent |
@admsugar: ping, any news? :-) Honza |
It would be great if error tracing can be done using following API.
try {
}
catch (err) {
TraceError.sysoutError(err);
}
no need to specify the "EXCEPTION" keyword, the log should be red in the tracing console automatically.
Currently we have to:
TraceError.sysout("Grip.getProps; EXCEPTION " + err, err);
@fflorent: since you are working on issue #1, perhaps you could do this one too?
Honza
Edit: Good first bug. Basically, the idea is to test if:
TraceError.sysout()
If it is the case (let
err
be the exception argument):err.stack
(or maybeComponents.stack
if it doesn't provide the name)TraceError.sysout("<name of the calling method>; EXCEPTION " + err, err);
TraceError
is initialised inlib/core/trace.js
Florent
The text was updated successfully, but these errors were encountered: