MCPcopy Create free account
hub / github.com/marcbachmann/node-html-pdf / buildStack

Function buildStack

lib/scripts/pdf_a4_portrait.js:14–23  ·  view source on GitHub ↗
(msg, trace)

Source from the content-addressed store, hash-verified

12
13// Build stack to print
14function buildStack (msg, trace) {
15 var msgStack = [msg]
16 if (trace && trace.length) {
17 msgStack.push('Stack:')
18 trace.forEach(function (t) {
19 msgStack.push(' at ' + t.file || t.sourceURL + ': ' + t.line + ' (in function ' + t.function + ')')
20 })
21 }
22 return msgStack.join('\n')
23}
24
25phantom.onError = function (msg, trace) {
26 exit(buildStack('Script - ' + msg, trace))

Callers 1

pdf_a4_portrait.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected