From: deepak1556 Date: Mon, 11 May 2015 04:54:44 +0000 (+0530) Subject: provide default error message X-Git-Tag: v0.26.0~3^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=24bcd3b21e71cbc8d5eb7507271297478af6b4b2;p=electron.git provide default error message --- diff --git a/atom/browser/api/atom_api_protocol.cc b/atom/browser/api/atom_api_protocol.cc index 617a098a..8a7e0ae6 100644 --- a/atom/browser/api/atom_api_protocol.cc +++ b/atom/browser/api/atom_api_protocol.cc @@ -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, diff --git a/docs/api/protocol.md b/docs/api/protocol.md index bcc33527..65554e05 100644 --- a/docs/api/protocol.md +++ b/docs/api/protocol.md @@ -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