provide default error message
authordeepak1556 <hop2deep@gmail.com>
Mon, 11 May 2015 04:54:44 +0000 (10:24 +0530)
committerdeepak1556 <hop2deep@gmail.com>
Mon, 11 May 2015 04:54:44 +0000 (10:24 +0530)
atom/browser/api/atom_api_protocol.cc
docs/api/protocol.md

index 617a098..8a7e0ae 100644 (file)
@@ -106,7 +106,8 @@ class CustomProtocolRequestJob : public AdapterRequestJob {
                        GetWeakPtr(), path));
         return;
       } else if (name == "RequestErrorJob") {
-        int error;
+        // Default value net::ERR_NOT_IMPLEMENTED
+        int error = -11;
         dict.Get("error", &error);
 
         BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
index bcc3352..65554e0 100644 (file)
@@ -89,7 +89,8 @@ Create a request job which sends a buffer as response.
 * `code` Integer
 
 Create a request job which sets appropriate network error message to console.
-Code should be in the following range.
+Default message is `net::ERR_NOT_IMPLEMENTED`. Code should be in the following 
+range.
 
 * Ranges:
   * 0- 99 System related errors