2 * Copyright (c) 2014-2015 Sylvain Peyrefitte
4 * This file is part of node-rdpjs.
6 * node-rdpjs is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20var inherits = require('util').inherits;
23 * Fatal error stop program
25function FatalError(message, code) {
26 Error.captureStackTrace(this);
27 this.message = message || "";
28 this.code = code || 'NODE_RDP_CORE_ERROR_NO_ERROR_CODE';
34inherits(FatalError, Error);
37 * Protocol error (non fatal);
39function ProtocolError(code, message) {
40 Error.captureStackTrace(this);
42 this.message = message || "";
48inherits(ProtocolError, Error);
51 * ImplementationError error (non fatal);
53function ImplementationError(code, message) {
54 Error.captureStackTrace(this);
56 this.message = message || "";
62inherits(ImplementationError, Error);
68 FatalError : FatalError,
69 ProtocolError : ProtocolError,
70 ImplementationError : ImplementationError