aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/Exception.h
blob: 1202c37c9a0b0bc29626a7109095d26a8999c80b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
 * Copyright (C) 2004 Red Hat Inc.
 * Copyright (C) 2010 TigerVNC Team
 * 
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 * USA.
 */

#ifndef __RDR_EXCEPTION_H__
#define __RDR_EXCEPTION_H__

namespace rdr {

  struct Exception {
    enum { len = 256 };
    char str_[len];
    Exception(const char *format=nullptr, ...)
      __attribute__((__format__ (__printf__, 2, 3)));
    virtual ~Exception() {}
    virtual const char* str() const { return str_; }
  };

  struct SystemException : public Exception {
    int err;
    SystemException(const char* s, int err_);
  };

  struct SocketException : public SystemException {
    SocketException(const char* text, int err_) : SystemException(text, err_) {}
  };

  struct GAIException : public Exception {
    int err;
    GAIException(const char* s, int err_);
  };

  struct EndOfStream : public Exception {
    EndOfStream() : Exception("End of stream") {}
  };

}

#endif
: { "node": "./dist/jquery.factory.js", "default": "./dist-module/jquery.factory.module.js" }, "./factory-slim": { "node": "./dist/jquery.factory.slim.js", "default": "./dist-module/jquery.factory.slim.module.js" }, "./src/*.js": "./src/*.js" }, "main": "dist/jquery.js", "scripts": { "babel:tests": "babel test/data/core/jquery-iterability-transpiled-es6.js --out-file test/data/core/jquery-iterability-transpiled.js", "build": "node ./build/command.js", "build:all": "node -e \"require('./build/tasks/build.js').buildDefaultFiles()\"", "build:main": "node -e \"require('./build/tasks/build.js').build()\"", "jenkins": "npm run pretest && npm run test:browserless", "lint:dev": "eslint --cache .", "lint:json": "jsonlint --quiet package.json", "lint": "concurrently -r \"npm:lint:dev\" \"npm:lint:json\"", "npmcopy": "node build/tasks/npmcopy.js", "prepare": "husky install", "pretest": "npm run qunit-fixture && npm run babel:tests && npm run npmcopy", "qunit-fixture": "node build/tasks/qunit-fixture.js", "start": "node -e \"require('./build/tasks/build.js').buildDefaultFiles({ watch: true })\"", "test:browserless": "npm run pretest && npm run test:node_smoke_tests && npm run test:promises_aplus && npm run test:jsdom", "test:browser": "npm run pretest && npm run build:all && grunt karma:main", "test:esmodules": "npm run pretest && npm run build:main && grunt karma:esmodules", "test:jsdom": "npm run pretest && npm run build:main && grunt test:jsdom", "test:no-deprecated": "npm run pretest && npm run build -- -e deprecated && grunt karma:main", "test:selector-native": "npm run pretest && npm run build -- -e selector && grunt karma:main", "test:slim": "npm run pretest && npm run build -- --slim && grunt karma:main", "test:node_smoke_tests": "npm run pretest && npm run build:all && node build/tasks/node_smoke_tests.js", "test:promises_aplus": "npm run build:main && node build/tasks/promises_aplus_tests.js", "test": "npm run build:all && npm run lint && npm run test:browserless && npm run test:browser && npm run test:esmodules && npm run test:slim && npm run test:no-deprecated && npm run test:selector-native" }, "homepage": "https://jquery.com", "author": { "name": "OpenJS Foundation and other contributors", "url": "https://github.com/jquery/jquery/blob/main/AUTHORS.txt" }, "repository": { "type": "git", "url": "https://github.com/jquery/jquery.git" }, "keywords": [ "jquery", "javascript", "browser", "library" ], "bugs": { "url": "https://github.com/jquery/jquery/issues" }, "license": "MIT", "devDependencies": { "@babel/cli": "7.22.9", "@babel/core": "7.10.5", "@babel/plugin-transform-for-of": "7.10.4", "@prantlf/jsonlint": "14.0.3", "@swc/core": "1.3.78", "bootstrap": "5.3.0", "chalk": "5.3.0", "colors": "1.4.0", "commitplease": "3.2.0", "concurrently": "8.2.0", "core-js-bundle": "3.6.5", "eslint": "8.51.0", "eslint-config-jquery": "3.0.2", "eslint-plugin-import": "2.28.1", "express": "4.18.2", "globals": "13.20.0", "grunt": "1.5.3", "grunt-cli": "1.4.3", "grunt-git-authors": "3.2.0", "grunt-karma": "4.0.2", "husky": "8.0.3", "jsdom": "19.0.0", "karma": "6.4.1", "karma-browserstack-launcher": "1.6.0", "karma-chrome-launcher": "3.1.1", "karma-firefox-launcher": "2.1.2", "karma-ie-launcher": "1.0.0", "karma-jsdom-launcher": "12.0.0", "karma-qunit": "4.1.2", "karma-webkit-launcher": "2.1.0", "load-grunt-tasks": "5.1.0", "multiparty": "4.2.3", "native-promise-only": "0.8.1", "playwright-webkit": "1.30.0", "promises-aplus-tests": "2.1.2", "q": "1.5.1", "qunit": "2.10.1", "raw-body": "2.4.1", "requirejs": "2.3.6", "rimraf": "3.0.2", "rollup": "2.21.0", "sinon": "7.3.1", "strip-json-comments": "3.1.1", "testswarm": "1.1.2", "yargs": "17.7.2" }, "commitplease": { "nohook": true, "components": [ "Docs", "Tests", "Build", "Support", "Release", "Core", "Ajax", "Attributes", "Callbacks", "CSS", "Data", "Deferred", "Deprecated", "Dimensions", "Effects", "Event", "Manipulation", "Offset", "Queue", "Selector", "Serialize", "Traversing", "Wrap" ], "markerPattern": "^((clos|fix|resolv)(e[sd]|ing))|^(refs?)", "ticketPattern": "^((Closes|Fixes) ([a-zA-Z]{2,}-)[0-9]+)|^(Refs? [^#])" } }