Skip to content

Commit

Permalink
Fixed some hardcoded strings to reference TobyLanguage instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 7, 2001
1 parent 9209df3 commit 7876b6b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions last/toby/gui/TobyMenuBar.java
Expand Up @@ -377,20 +377,26 @@ public void run()
long linkTime = p.getTotalLinkTime();
long execTime = this.globalContext.getTotalExecTime();
long totalTime = execTime + parseTime + linkTime;


// !!! This needs to make it's way into the GUI, and TobyLanguage.

System.err.println();
System.err.println(" !!! unlocalized text: !!!");
System.err.println("Parse time : " + parseTime + " milliseconds.");
System.err.println("Link time : " + linkTime + " milliseconds.");
System.err.println("Exec. time : " + execTime + " milliseconds.");
System.err.println("Total time : " + totalTime + " milliseconds.");
System.err.println();

} // try
catch (FlowException exc)
{
String errMsg = "Error: " + exc.getMessage() +
" on line " + exc.exceptionLine +
" in function " + exc.procName;
JOptionPane.showMessageDialog(null, errMsg,
TobyLanguage.ERROR,
String s = TobyLanguage.ERR_IN_FUNC;
s = TobyLanguage.replaceFmtTokenInStr(0, s, exc.getMessage());
s = TobyLanguage.replaceFmtTokenInStr(1, s, exc.exceptionLine);
s = TobyLanguage.replaceFmtTokenInStr(2, s, exc.procName);
JOptionPane.showMessageDialog(null, s, TobyLanguage.ERROR,
JOptionPane.ERROR_MESSAGE);


Expand All @@ -399,11 +405,9 @@ public void run()
} // catch
catch (Exception exc)
{

// !!! tobylanguage?
String errMsg = exc.getClass().getName() + ":" + exc.getMessage();
errMsg += "\n\n";
errMsg += "This should not happen. Email icculus@lokigames.com!";
errMsg += TobyLanguage.SHOULDNOTBE;
JOptionPane.showMessageDialog(null, errMsg,
TobyLanguage.ERROR,
JOptionPane.ERROR_MESSAGE);
Expand Down

0 comments on commit 7876b6b

Please sign in to comment.