Regexp fix, error stack sending refactor

This commit is contained in:
MrFry 2019-10-07 13:51:57 +02:00
parent a9f9d1951f
commit aba448fdc2

View file

@ -65,7 +65,7 @@ const commonUselessAnswerParts = [
'The correct answer is:', 'The correct answer is:',
'\'' '\''
] ]
const commonUselessStringParts = [',', '.', ':', '!'] const commonUselessStringParts = [',', '\\.', ':', '!']
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// : Class descriptions {{{ // : Class descriptions {{{
@ -1250,7 +1250,7 @@ function ShowAnswers (answers, question) {
}, undefined, function () { }, undefined, function () {
OpenErrorPage({ OpenErrorPage({
message: 'No result found', message: 'No result found',
stack: question // TODO: test this stack: JSON.stringify(question)
}) })
}) })
} }
@ -2187,10 +2187,10 @@ function OpenErrorPage (e) {
path += '?' path += '?'
} }
if (e.message) { if (e.message) {
path += 'msg:' + SUtils.SimplifyQuery(e.message) + '&' path += 'msg:' + SUtils.SimplifyQuery(e.message)
} }
if (e.stack) { if (e.stack) {
path += 'stack:' + SUtils.SimplifyStack(e.stack) path += '___stack:' + SUtils.SimplifyStack(e.stack)
} }
path = SUtils.RemoveSpecialChars(path) path = SUtils.RemoveSpecialChars(path)
} catch (e) { } catch (e) {