From 24bcd3b21e71cbc8d5eb7507271297478af6b4b2 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 11 May 2015 10:24:44 +0530 Subject: [PATCH] provide default error message --- atom/browser/api/atom_api_protocol.cc | 3 ++- docs/api/protocol.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/atom/browser/api/atom_api_protocol.cc b/atom/browser/api/atom_api_protocol.cc index 617a098..8a7e0ae 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 bcc3352..65554e0 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 -- 2.7.4