Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Blake Niemyjski
@niemyjski
sigh
Blake Niemyjski
@niemyjski
[Priority(15)]
public class HandleAggregateExceptionsPlugin : IEventPlugin {
    public void Run(EventPluginContext context) {
        var aggregateException = context.ContextData.GetException() as AggregateException;
        if (aggregateException == null)
            return;

        var exception = aggregateException.Flatten();
        if (exception.InnerExceptions.Count == 1) {
            context.ContextData.SetException(exception.InnerException);
            return;
        }

        foreach (var ex in exception.InnerExceptions) {
            // copy entire context;
            // submit event again..
        }

        context.Cancel = true;
    }
}
Blake Niemyjski
@niemyjski
we have nothing for cloning an event
guess I could serialize it and then deserialize it
public void Run(EventPluginContext context) {
var aggregateException = context.ContextData.GetException() as AggregateException;
if (aggregateException == null)
return;
        var exception = aggregateException.Flatten();
        if (exception.InnerExceptions.Count == 1) {
            context.ContextData.SetException(exception.InnerException);
            return;
        }

        foreach (var ex in exception.InnerExceptions) {
            var ctx = new ContextData(context.ContextData);
            ctx.SetException(ex);

            var serializer = context.Resolver.GetJsonSerializer();
            context.Client.SubmitEvent(serializer.Deserialize(serializer.Serialize(context.Event), typeof(Event)) as Event, ctx);
        }

        context.Cancel = true;
    }
That stinks but I don’t want to have a reference to anything as the message could be changed per event type
Frank Ebersoll
@frankebersoll
@niemyjski Refactoring done, merged your code.
Blake Niemyjski
@niemyjski
exceptionless/Exceptionless.Net@9dee17a
awesome :D
@frankebersoll I’ll test it out
Frank Ebersoll
@frankebersoll
Todd is doing awesome work right now.
ToddThomson/tsproject#71
ToddThomson/tsproject#74
Blake Niemyjski
@niemyjski
Sawweet
Frank Ebersoll
@frankebersoll
trying to push the source map thing a little. I have source map issues in another project that uses coffee script, so I will delve into that topic now.
first thing will be understanding how the debugging protocol of node works and how it can be sniffed
maybe this will help in pinpointing problems where breakpoints do not work because the source maps are not right
i really hate not being able to break into code.
Eric J. Smith
@ejsmith
Yeah, seems like source maps don't quite work right.
I have yet to see a transpiler that makes them work perfectly.
Frank Ebersoll
@frankebersoll
typescript itself does.
Eric J. Smith
@ejsmith
Not sure if that is a limitation of the transpilers or of source maps themselves.
So if you just go directly through typescript they work good?
Frank Ebersoll
@frankebersoll
usually it’s a problem of having the paths mapped incorrectly
Eric J. Smith
@ejsmith
In my other app we are going through typescript and then Babel due to issues with typescript.
Frank Ebersoll
@frankebersoll
each sourcemap points back to its original source file, while itself is kept nearby the output file
Eric J. Smith
@ejsmith
Hoping that typescript will resolve those issues soon and we can skip the Babel step.
Frank Ebersoll
@frankebersoll
but this pointer must be an absolute path or a relative path that works
Eric J. Smith
@ejsmith
Yeah
Frank Ebersoll
@frankebersoll
and usually, gulp-sourcemap isn’t configured to put the right paths there
so the debugger won’t find the sources.
Sander Rijken
@srijken
I also had problems where source maps do work, but especially chrome caches them. Anyone seen that before? It feels strange to revert to IE because (part of) debugging is better :)
Blake Niemyjski
@niemyjski
I usually turn on the disable cache checkbox in chrome
Blake Niemyjski
@niemyjski
Eric J. Smith
@ejsmith
Probably should just map it to a simple error?
Since it's more similar to that. Then eventually we can implement the simple error parser.
Blake Niemyjski
@niemyjski
yeah
not a bad idea
because they have different languages going to it
Eric J. Smith
@ejsmith
Yeah
Blake Niemyjski
@niemyjski
@skoub, for simple errors just look at the SimpleError known data key and then the stack trace is just a string :)
Jamie Clarke
@jamie94bc
@niemyjski any chance the settings base class in Exceptionless could become part of Foundatio? Seems like something most projects end up with!
Eric J. Smith
@ejsmith
@jamie94bc yeah, we were talking about that the other day. The problem is that in .net core the configuration stuff they have is better. I kind of don't want to include things that will be covered by the framework. What are your thoughts?
Blake Niemyjski
@niemyjski
:)]
dang
feel honored :D
Eric J. Smith
@ejsmith
so what is the status of the issues that you ran into with them though?
did they just release anyway?
Blake Niemyjski
@niemyjski
yeah