protocol: adding error job to log error with custom protocols

This commit is contained in:
deepak1556 2015-05-07 13:12:35 +05:30
parent e5380fd671
commit 9ab53b0e4b
5 changed files with 49 additions and 2 deletions

View file

@ -82,4 +82,24 @@ Create a request job which sends a string as response.
* `encoding` String - Default is `UTF-8`
* `data` Buffer
Create a request job which accepts a buffer and sends a string as response.
Create a request job which sends a buffer as response.
## Class: protocol.RequestErrorJob(code)
* `code` Integer
Create a request job which sets appropriate network error message to console.
Code should be in the following range.
* Ranges:
* 0- 99 System related errors
* 100-199 Connection related errors
* 200-299 Certificate errors
* 300-399 HTTP errors
* 400-499 Cache errors
* 500-599 ?
* 600-699 FTP errors
* 700-799 Certificate manager errors
* 800-899 DNS resolver errors
Check the [network error list](https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_error_list.h) for code and message relations.