protected override Trace Create(Type objectType, JObject jObject) { Trace trace = new Trace(); trace.Event = (string)jObject["event"]; trace.Line = (int)jObject["line"]; if (trace.Event == "uncaught_exception") { trace.Exception_msg = (string)jObject["exception_msg"]; trace.isError = true; } else { trace.isError = false; trace.Func_name = (string)jObject["func_name"]; List <string> ordered = VarsFunc.getOrdered((JArray)jObject["ordered_globals"]); trace.Globals = VarsFunc.getVars((JObject)jObject["globals"], ordered); trace.Heap = VarsFunc.getVars((JObject)jObject["heap"]); trace.Stack_to_render = getStack((JArray)jObject["stack_to_render"]); trace.Stdout = (string)jObject["stdout"]; } return(trace); }
protected override Stack_to_render Create(Type objectType, JObject jObject) { Stack_to_render stack = new Stack_to_render(); List <string> ordered = VarsFunc.getOrdered((JArray)jObject["ordered_varnames"]); stack.Encoded_locals = VarsFunc.getVars((JObject)jObject["encoded_locals"], ordered); stack.Frame_id = (string)jObject["frame_id"]; stack.Func_name = (string)jObject["func_name"]; stack.Is_highlighted = (bool)jObject["is_highlighted"]; stack.Is_parent = (bool)jObject["is_parent"]; stack.Is_zombie = (bool)jObject["is_zombie"]; //parent_frame_id_list stack.Unique_hash = (string)jObject["unique_hash"]; return(stack); }