Skip to content

Commit 3b9c32b

Browse files
authored
Merge pull request #1106 from mathjax/refactor/duplicate_errors
Corrects Duplicate use of Error Messages
2 parents cc65cef + ee6dfe4 commit 3b9c32b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ts/input/tex/ParseUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ export const ParseUtil = {
436436
}
437437
if (match !== '') {
438438
// @test Internal Math Error
439-
throw new TexError('MathNotTerminated', 'Math not terminated in text box');
439+
throw new TexError('MathNotTerminated', 'Math mode is not properly terminated');
440440
}
441441
}
442442
if (k < text.length) {

ts/input/tex/bussproofs/BussproofsMethods.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ function parseFCenterLine(parser: TexParser, name: string): MmlNode {
113113
let dollar = parser.GetNext();
114114
if (dollar !== '$') {
115115
throw new TexError('IllegalUseOfCommand',
116-
'Use of %1 does not match it\'s definition.', name);
116+
'Use of %1 does not match its definition.', name);
117117
}
118118
parser.i++;
119119
let axiom = parser.GetUpTo(name, '$');
120120
if (axiom.indexOf('\\fCenter') === -1) {
121-
throw new TexError('IllegalUseOfCommand',
122-
'Missing \\fCenter in %1.', name);
121+
throw new TexError('MissingProofCommand',
122+
'Missing %1 in %2.', '\\fCenter', name);
123123
}
124124
// Check for fCenter and throw error?
125125
let [prem, conc] = axiom.split('\\fCenter');

ts/input/tex/textmacros/TextMacrosMethods.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const TextMacrosMethods = {
8888
break;
8989
}
9090
}
91-
parser.Error('MathNotTerminated', 'Math-mode is not properly terminated');
91+
parser.Error('MathNotTerminated', 'Math mode is not properly terminated');
9292
},
9393

9494
/**
@@ -104,7 +104,7 @@ export const TextMacrosMethods = {
104104
* @param {string} c The character that called this function
105105
*/
106106
Misplaced(parser: TextParser, c: string) {
107-
parser.Error('Misplaced', '\'%1\' can not be used here', c);
107+
parser.Error('Misplaced', 'Misplaced \'%1\'', c);
108108
},
109109

110110
/**

0 commit comments

Comments
 (0)