queueobj 15.1.10 → 15.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/app.js +11 -4
  2. package/package.json +2 -2
package/app.js CHANGED
@@ -92,6 +92,7 @@ exports = module.exports = class QueueObj {
92
92
  t.reject_2q = null
93
93
  t.successMsg = ''
94
94
  t.log_queue = null
95
+ t.tagline = null
95
96
 
96
97
  t.logMsg = t.logMsg.bind(t)
97
98
  t.init = t.init.bind(t)
@@ -129,9 +130,6 @@ exports = module.exports = class QueueObj {
129
130
  process(props = {}) {
130
131
  let t = this, fname = `app.process`, xlog
131
132
 
132
- // if (typeof props.data_to_process_array == 'undefined')
133
- // t.reject('base_queue no props.data_to_process_array')
134
-
135
133
  if (typeof props.appender == 'undefined')
136
134
  t.reject('base_queue no props.appender')
137
135
  if (typeof props.process_objects == 'undefined')
@@ -154,6 +152,7 @@ exports = module.exports = class QueueObj {
154
152
  parent: t,
155
153
  relative_path: "./appenders/",
156
154
  logMsg: t.logMsg,
155
+ tagline: props.tagline,
157
156
  resolve: t.resolve_2q,
158
157
  reject: t.reject_2q
159
158
  }).load(props).process()
@@ -167,7 +166,7 @@ exports = module.exports = class QueueObj {
167
166
  return this.qJson.get_class_obj_array()
168
167
  }
169
168
 
170
- logMsg(props = { msg: '', type: '' }) {
169
+ logMsg(props = { msg: '', stack: '', type: '' }) {
171
170
  let t = this, fname = "QueueObj.logMsg"
172
171
  try {
173
172
  if (typeof props.msg == "undefined")
@@ -176,6 +175,14 @@ exports = module.exports = class QueueObj {
176
175
  throw new Error(`no type property in (${JSON.stringify(props)}) `)
177
176
  if (t.log_queue != null && typeof t.log_queue.logMsg != 'undefined') {
178
177
  t.log_queue.logMsg(props)
178
+ try {
179
+ if (typeof props.stack === 'string') {
180
+ var arr = props.stack.split("\n")[1].replace(/ /g, "")
181
+ t.log_queue.logMsg({ msg: arr, 'type': 'error' })
182
+ }
183
+ } catch (e) {
184
+ qObj.logMsg({ msg: e.message, 'stack': e.stack, 'type': "error" })
185
+ }
179
186
  } else {
180
187
  throw new Error(`t.log_queue does not exist`)
181
188
  }
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "author": {
3
3
  "name": "Jim Manton"
4
4
  },
5
- "version": "15.1.10",
5
+ "version": "15.1.12",
6
6
  "bundleDependencies": [],
7
7
  "dependencies": {
8
- "base-queue": "^3.0.6",
8
+ "base-queue": "^3.1.1",
9
9
  "colors": "^1.4.0",
10
10
  "log-queue": "^3.0.8",
11
11
  "valid-path": "^2.1.0"