Back to Basics: Exceptions## Back to Basics: Exceptions Klaus Iglberger, CppCon 2020 klaus.iglberger@gmx.de ## C++ Trainer since 2016 Author of the bl $ \text{ze} $ C++ math library (Co-)Organizer of the Munich C++ user group ## Content The Exception Situation How Do Exceptions Work Best Practices of Exception Handling When to Use Exceptions (And When Not) How to Use Exceptions The Exception Safety Guarantees How to Write ## Content The Exception Situation How Do Exceptions Work Best Practices of Exception Handling When to Use Exceptions (And When Not) How to Use Exceptions The Exception Safety Guarantees How to Write0 码力 | 111 页 | 4.87 MB | 1 年前3
Exceptions Under the Spotlight## EXCEPTIONS UNDER THE SPOTLIGHT INBAL LEVI ## WHO AM I? • A C++ enthusiast. • An embedded software engineer at Solar Edge working on smart home. • One of the organizers of CoreCpp conference and of the Israeli NB. • I've studied physics, I also love math. ## MOTIVATION Q14 Is throwing exceptions to report errors allowed throughout your current project?  avoid using exceptions for performance reasons. - The0 码力 | 53 页 | 2.82 MB | 1 年前3
C++ Exceptions for Smaller Firmware## C++ Exceptions for Smaller Firmware By: Khalil Estell (@kammce) @kammce Graduated 2017 from SJSU Ex-Googler (~6y) Volunteer @ SJSU ISO C++ Committee Member  { p_pin.level(true); 0 码力 | 237 页 | 6.74 MB | 1 年前3
Exceptionally Bad: The Story on the Misuse of Exceptions and How to Do Better## +23 ## Exceptionally Bad: The Story on the Misuse of Exceptions and How to Do Better ## PETER MULDOON ## +23 ## Exceptions in C++ Better Design Through Analysis of Real World Usage ## PETER MULDOON 89d8f46e8f468807c5/p4_1.jpg) ## Where will we be going? • Talk will be about Exceptions as seen in C++ • Look at original goals/ideals of exception handling • Look at the mechanics [Image](/uploads/documents/3/0/a/4/30a45afec39f5a89d8f46e8f468807c5/p5_1.jpg) ## Foreword Things to note about Exceptions in C++ • There is no exception class attribute/keyword • No formal definition of what an Exception0 码力 | 85 页 | 2.32 MB | 1 年前3
Noexcept: Enabling Testing of Contract Checksconstructor // destructors are implicitly ___ • Callers do not need to defend against possible exceptions: int *array = new int[N]; // Possible leak hazard if (is_numeric(s)) ... // does not throw compile time to enable an algorithm that is more performant but would be unsafe in the presence of exceptions. ## Contracts and Contract Checking I told you we'd get back to contracts! ## What is0 码力 | 90 页 | 1.38 MB | 1 年前3
The Weblate Manual 3.3BEHIND REVERSE PROXY IP PROXY Header IP PROXY OFFSET LOGIN REQUIRED URLs LOGIN REQUIRED URLs EXCEPTIONS MT SERVICES MT APERTIUM APY MT AWS ACCESS KEY ID MT AWS SECRET ACCESS KEY MT AWS REGION MT WEBLATE_REQUIRE_LOGIN=1 ## WEBLATE_LOGIN_REQUIRED_URLS_EXCEPTIONS Adds URL exceptions for login required for whole Weblate using LOGIN REQUIRED URLs EXCEPTIONS. ## WEBLATE_GOOGLE_ANALYTICS_ID Configures ID LOGIN_REQUIRED_URLS_EXCEPTIONS List of exceptions for LOGIN REQUIRED URLs. If you don’t specify this list, the default value will be used, which allows users to access the login page. Some of exceptions you might0 码力 | 403 页 | 1.75 MB | 2 年前3
Flask Documentation (1.1.x)Larger Applications • Application Factories • Application Dispatching Implementing API Exceptions ○ Using URL Processors ○ Deploying with Setuptools ○ Deploying with Fabric ○ Using SQLite KeyError [https://docs.python.org/3/library/exceptions.html#KeyError] is raised. You can catch it like a standard KeyError [https://docs.python.org/3/library/exceptions.html#KeyError] but if you don’t do that accessing URL parameters with get or by catching the KeyError [https://docs.python.org/3/library/exceptions.html#KeyError] because users might change the URL and presenting them a 400 bad request page in0 码力 | 428 页 | 895.98 KB | 2 年前3
websockets Documentation
Release 9.0the direct cause of the following exception: Traceback (most recent call last): ... websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed, $ \rightarrow $ abnormally [internal]) the direct cause of the following exception: Traceback (most recent call last): ... websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed, abnormally [internal]), no reason it means logger.addHandler(logging.StreamHandler()) The logs contain: • Exceptions in the connection handler at the ERROR level • Exceptions in the opening or closing handshake at the INFO level • All frames0 码力 | 81 页 | 352.88 KB | 2 年前3
Exceptional C++exciting things happening on the error handling flow, too. Although not universally loved/used, exceptions are a powerful mechanism of maneuvering execution on the unhappy path. Even if std::exception we're taking the scenic Windows route, we're also going to encounter async exceptions (structured exceptions) on our quest for a better crash. We'll poke into these mechanisms and see how we we can leverage them in our application error handling. Did I mention threads? Routing exceptions between threads... oh my! ## S Advanced Installer  ## Automatic retry for known exceptions New in version 4.0. Sometimes you just want to retry a task whenever a particular exception is automatically retry a task using autoretry_for argument in the task(). decorator: from twitter.exceptions import FailWhaleError @app.task(autoretry_for=(FailWhaleError,)) def refresh_timeline(user): return twitter.refresh_timeline(user) This is provided as an alternative to manually handling the exceptions, and the example above will do the same as wrapping the task body in a try. [https://docs.python0 码力 | 1215 页 | 1.44 MB | 2 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
异常错误代码双接口异常安全std::terminateC++异常处理libstd++RTTIC++异常二进制大小动态_cast运行时类型信息(RTTI)零开销原则错误处理控制流日志记录contract checksnoexceptexceptionstestingannotationsWeblate版本发布翻译工具性能改进兼容性调整FlaskApplication ObjectBlueprint ObjectsJinjaWerkzeugwebsocketsAPI兼容性策略WebSocket协议版本9.0Exception InternalsException HandlingException Safe CodeError Handlingbest practices任务队列分布式系统实时处理任务调度版本兼容性













