Software /
code /
prosody-modules
Comparison
mod_sentry/sentry.lib.lua @ 4289:de91b7cb7342
mod_sentry: Fix to correctly iterate over traceback
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 09 Dec 2020 16:22:22 +0000 |
parent | 4288:26bc1ae88ccb |
child | 4291:a0d20e378670 |
comparison
equal
deleted
inserted
replaced
4288:26bc1ae88ccb | 4289:de91b7cb7342 |
---|---|
68 data = get_error_data(e.instance_id, e.context); | 68 data = get_error_data(e.instance_id, e.context); |
69 }; | 69 }; |
70 }; | 70 }; |
71 local traceback = e.context.traceback; | 71 local traceback = e.context.traceback; |
72 if traceback and type(traceback) == "table" then | 72 if traceback and type(traceback) == "table" then |
73 for i = #traceback, 1 do | |
74 local frames = array(); | 73 local frames = array(); |
74 for i = #traceback, 1, -1 do | |
75 local frame = traceback[i]; | 75 local frame = traceback[i]; |
76 table.insert(frames, { | 76 table.insert(frames, { |
77 ["function"] = frame.info.name; | 77 ["function"] = frame.info.name; |
78 filename = frame.info.short_src; | 78 filename = frame.info.short_src; |
79 lineno = frame.info.currentline; | 79 lineno = frame.info.currentline; |