| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 /** | 106 /** |
| 107 * @param {?string} error | 107 * @param {?string} error |
| 108 * @param {!DebuggerAgent.SetScriptSourceError=} errorData | 108 * @param {!DebuggerAgent.SetScriptSourceError=} errorData |
| 109 * @param {!WebInspector.Script=} contextScript | 109 * @param {!WebInspector.Script=} contextScript |
| 110 */ | 110 */ |
| 111 WebInspector.LiveEditSupport.logDetailedError = function(error, errorData, conte
xtScript) | 111 WebInspector.LiveEditSupport.logDetailedError = function(error, errorData, conte
xtScript) |
| 112 { | 112 { |
| 113 var warningLevel = WebInspector.ConsoleMessage.MessageLevel.Warning; | 113 var warningLevel = WebInspector.ConsoleMessage.MessageLevel.Warning; |
| 114 if (!errorData) { | 114 if (!errorData) { |
| 115 if (error) | 115 if (error) |
| 116 WebInspector.console.log(WebInspector.UIString("LiveEdit failed: %s"
, error), warningLevel, false); | 116 WebInspector.messageSink.addMessage(WebInspector.UIString("LiveEdit
failed: %s", error), warningLevel); |
| 117 return; | 117 return; |
| 118 } | 118 } |
| 119 var compileError = errorData.compileError; | 119 var compileError = errorData.compileError; |
| 120 if (compileError) { | 120 if (compileError) { |
| 121 var location = contextScript ? WebInspector.UIString(" at %s:%d:%d", con
textScript.sourceURL, compileError.lineNumber, compileError.columnNumber) : ""; | 121 var location = contextScript ? WebInspector.UIString(" at %s:%d:%d", con
textScript.sourceURL, compileError.lineNumber, compileError.columnNumber) : ""; |
| 122 var message = WebInspector.UIString("LiveEdit compile failed: %s%s", com
pileError.message, location); | 122 var message = WebInspector.UIString("LiveEdit compile failed: %s%s", com
pileError.message, location); |
| 123 WebInspector.console.log(message, WebInspector.ConsoleMessage.MessageLev
el.Error, false); | 123 WebInspector.messageSink.addErrorMessage(message); |
| 124 } else { | 124 } else { |
| 125 WebInspector.console.log(WebInspector.UIString("Unknown LiveEdit error:
%s; %s", JSON.stringify(errorData), error), warningLevel, false); | 125 WebInspector.messageSink.addMessage(WebInspector.UIString("Unknown LiveE
dit error: %s; %s", JSON.stringify(errorData), error), warningLevel); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 WebInspector.LiveEditSupport.logSuccess = function() | 129 WebInspector.LiveEditSupport.logSuccess = function() |
| 130 { | 130 { |
| 131 WebInspector.console.log(WebInspector.UIString("Recompilation and update suc
ceeded."), WebInspector.ConsoleMessage.MessageLevel.Debug, false); | 131 WebInspector.messageSink.addMessage(WebInspector.UIString("Recompilation and
update succeeded.")); |
| 132 } | 132 } |
| 133 | 133 |
| 134 /** @type {!WebInspector.LiveEditSupport} */ | 134 /** @type {!WebInspector.LiveEditSupport} */ |
| 135 WebInspector.liveEditSupport; | 135 WebInspector.liveEditSupport; |
| OLD | NEW |