mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Regexp fix, error stack sending refactor
This commit is contained in:
parent
a9f9d1951f
commit
aba448fdc2
1 changed files with 4 additions and 4 deletions
8
main.js
8
main.js
|
@ -65,7 +65,7 @@ const commonUselessAnswerParts = [
|
|||
'The correct answer is:',
|
||||
'\''
|
||||
]
|
||||
const commonUselessStringParts = [',', '.', ':', '!']
|
||||
const commonUselessStringParts = [',', '\\.', ':', '!']
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
// : Class descriptions {{{
|
||||
|
@ -1250,7 +1250,7 @@ function ShowAnswers (answers, question) {
|
|||
}, undefined, function () {
|
||||
OpenErrorPage({
|
||||
message: 'No result found',
|
||||
stack: question // TODO: test this
|
||||
stack: JSON.stringify(question)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -2187,10 +2187,10 @@ function OpenErrorPage (e) {
|
|||
path += '?'
|
||||
}
|
||||
if (e.message) {
|
||||
path += 'msg:' + SUtils.SimplifyQuery(e.message) + '&'
|
||||
path += 'msg:' + SUtils.SimplifyQuery(e.message)
|
||||
}
|
||||
if (e.stack) {
|
||||
path += 'stack:' + SUtils.SimplifyStack(e.stack)
|
||||
path += '___stack:' + SUtils.SimplifyStack(e.stack)
|
||||
}
|
||||
path = SUtils.RemoveSpecialChars(path)
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue