MCPcopy
hub / github.com/MithrilJS/mithril.js / ensureStackTrace

Function ensureStackTrace

ospec/ospec.js:309–313  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

307 return hasProcess||!color ? "" : "color:"+color+(bold ? ";font-weight:bold" : "")
308 }
309 function ensureStackTrace(error) {
310 // mandatory to get a stack in IE 10 and 11 (and maybe other envs?)
311 if (error.stack === undefined) try { throw error } catch(e) {return e}
312 else return error
313 }
314 function getStackName(e, exp) {
315 return e.stack && exp.test(e.stack) ? e.stack.match(exp)[1] : null
316 }

Callers 4

ospec.jsFile · 0.85
oFunction · 0.85
hookFunction · 0.85
failFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected