Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: remoting/webapp/crd/js/error.js

Issue 1065733004: Added partial unit tests for host_controller.js. More to come. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hdf-unittest
Patch Set: added licenses to satisfy presubmit Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/base/js/base_unittest.js ('k') | remoting/webapp/crd/js/host_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/error.js
diff --git a/remoting/webapp/crd/js/error.js b/remoting/webapp/crd/js/error.js
index 6969beadeb0106bbec140ce70afdcb92e65823f8..d1dbbe2480ca76cd1ba9e7afad91a72fb8d6f3e5 100644
--- a/remoting/webapp/crd/js/error.js
+++ b/remoting/webapp/crd/js/error.js
@@ -43,6 +43,13 @@ remoting.Error.prototype.getTag = function() {
};
/**
+ * @return {?string} The detail string passed to the constructor, if any.
+ */
+remoting.Error.prototype.getDetail = function() {
+ return this.detail_;
+};
+
+/**
* Checks the type of an error.
* @param {remoting.Error.Tag} tag
* @param {...remoting.Error.Tag} var_args
@@ -75,10 +82,11 @@ remoting.Error.none = function() {
/**
* Convenience method for creating the most common error type.
+ * @param {string=} opt_detail
* @return {!remoting.Error}
*/
-remoting.Error.unexpected = function() {
- return new remoting.Error(remoting.Error.Tag.UNEXPECTED);
+remoting.Error.unexpected = function(opt_detail) {
+ return new remoting.Error(remoting.Error.Tag.UNEXPECTED, opt_detail);
};
/**
« no previous file with comments | « remoting/webapp/base/js/base_unittest.js ('k') | remoting/webapp/crd/js/host_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698