Skip to content

Commit

Permalink
provide default error message
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed May 11, 2015
1 parent 9ab53b0 commit 24bcd3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion atom/browser/api/atom_api_protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion docs/api/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24bcd3b

Please sign in to comment.