From 3518e4861b0acd9ffcabc126bbea0b1302dd9f28 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 26 Aug 2016 09:04:04 -0400 Subject: [PATCH] Number error codes from 1 (fix #54) --- doc/reference.xsl | 2 +- extras/beast/test/fail_counter.hpp | 4 +++- include/beast/http/parse_error.hpp | 2 ++ include/beast/websocket/error.hpp | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/reference.xsl b/doc/reference.xsl index 3a82f1e5..4c37e306 100644 --- a/doc/reference.xsl +++ b/doc/reference.xsl @@ -5,7 +5,7 @@ Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.beast.org/LICENSE_1_0.txt) + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) --> diff --git a/extras/beast/test/fail_counter.hpp b/extras/beast/test/fail_counter.hpp index 28e1c90c..b58e1f12 100644 --- a/extras/beast/test/fail_counter.hpp +++ b/extras/beast/test/fail_counter.hpp @@ -15,7 +15,9 @@ namespace test { enum error { - fail_error = 1 + success = 0, + + fail_error }; namespace detail { diff --git a/include/beast/http/parse_error.hpp b/include/beast/http/parse_error.hpp index c98934dc..b4d5c8d0 100644 --- a/include/beast/http/parse_error.hpp +++ b/include/beast/http/parse_error.hpp @@ -15,6 +15,8 @@ namespace http { enum class parse_error { + success = 0, + connection_closed, bad_method, diff --git a/include/beast/websocket/error.hpp b/include/beast/websocket/error.hpp index 9af24b1c..c86307cb 100644 --- a/include/beast/websocket/error.hpp +++ b/include/beast/websocket/error.hpp @@ -16,8 +16,10 @@ namespace websocket { /// Error codes returned from @ref stream operations. enum class error { + success = 0, + /// Both sides performed a WebSocket close - closed = 1, + closed, /// WebSocket connection failed, protocol violation failed,