OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 var warningLevel = WebInspector.Console.MessageLevel.Warning; | 138 var warningLevel = WebInspector.Console.MessageLevel.Warning; |
139 if (!errorData) { | 139 if (!errorData) { |
140 if (error) | 140 if (error) |
141 WebInspector.console.addMessage(WebInspector.UIString("LiveEdit fail
ed: %s", error), warningLevel); | 141 WebInspector.console.addMessage(WebInspector.UIString("LiveEdit fail
ed: %s", error), warningLevel); |
142 return; | 142 return; |
143 } | 143 } |
144 var compileError = errorData.compileError; | 144 var compileError = errorData.compileError; |
145 if (compileError) { | 145 if (compileError) { |
146 var location = contextScript ? WebInspector.UIString(" at %s:%d:%d", con
textScript.sourceURL, compileError.lineNumber, compileError.columnNumber) : ""; | 146 var location = contextScript ? WebInspector.UIString(" at %s:%d:%d", con
textScript.sourceURL, compileError.lineNumber, compileError.columnNumber) : ""; |
147 var message = WebInspector.UIString("LiveEdit compile failed: %s%s", com
pileError.message, location); | 147 var message = WebInspector.UIString("LiveEdit compile failed: %s%s", com
pileError.message, location); |
148 WebInspector.console.addErrorMessage(message); | 148 WebInspector.console.error(message); |
149 } else { | 149 } else { |
150 WebInspector.console.addMessage(WebInspector.UIString("Unknown LiveEdit
error: %s; %s", JSON.stringify(errorData), error), warningLevel); | 150 WebInspector.console.addMessage(WebInspector.UIString("Unknown LiveEdit
error: %s; %s", JSON.stringify(errorData), error), warningLevel); |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 WebInspector.LiveEditSupport.logSuccess = function() | 154 WebInspector.LiveEditSupport.logSuccess = function() |
155 { | 155 { |
156 WebInspector.console.addMessage(WebInspector.UIString("Recompilation and upd
ate succeeded."), WebInspector.Console.MessageLevel.Log); | 156 WebInspector.console.log(WebInspector.UIString("Recompilation and update suc
ceeded.")); |
157 } | 157 } |
OLD | NEW |