The Absurdity of Error Handling
The Absurdity of Error Handling: Finding a Purpose for Errors in Safety-Critical SYCL Erik Tomusk CppCon 2023 October 5, 2023© 2023 Codeplay Software Ltd. Codeplay Corporate Slide 2© 2023 Codeplay explicitly stated© 2023 Codeplay Software Ltd. Outline • Definition of Safety • Definition of Error Handling • Case Study • Why is this Important? • Is it Really so bad? • What does this mean for execution time (in mainstream compilers) 17Definition of Error Handling 18© 2023 Codeplay Software Ltd. Definition of Error Handling • Exceptions and error codes are sometimes used for reporting or information0 码力 | 43 页 | 1.39 MB | 5 月前3Customizing Compilation Error Messages
CppCon 2024 Customizing Compilation Error Messages Formatting a Compile-Time String During Substitution Failure Patrick Roberts, P.E. Principal Software Engineer 1CppCon 2024 What problem does solve? 2CppCon 2024 3CppCon 2024 4CppCon 2024 5CppCon 2024 6 Guidelines for a helpful error message Where is the error? ✅ What is wrong? ✅ How can it be fixed? ❌CppCon 2024 7CppCon 2024 8CppCon 2024 90 码力 | 12 页 | 1.47 MB | 5 月前3Modern C++ Error Handling
Modern C++ Handling Phil Nash Error2018 2019series disappointments of a (total) Part 1int parse_int(std::string_view number)// TODO: +, -, digit separators? int acc = 0; for(char c first_digit = false; } return ParseStatus::Numeric; } 42 42 (starts with an int) Error: x42 is not an int test("42"); test("42x"); test("x42"); [[nodiscard]] void test(std::string_view int)”, i); break; case ParseStatus::NonNumeric: std::println(“Error: {} is not an int", str); break; } }int parse_int(std::string_view number) {0 码力 | 66 页 | 36.65 MB | 5 月前3Creating a Sender/Receiver HTTP Server
TechAtBloomberg.com © 2024 Bloomberg Finance L.P. All rights reserved. • Create a basic HTTP server. • Allow a single-threaded server handling multiple clients. • Use the sender/receiver asynchronous work consist of accepting incoming client connections. • Each client processes requests until an error is received. Basic DesignTechAtBloomberg.com © 2024 Bloomberg Finance L.P. All rights reserved. std::execution (sender/receiver): http://wg21.link/p2300 • https://github.com/NVIDIA/stdexec.git • https://github.com/beman-project/execution26 • Sender/receiver networking: http://wg21.link/p2762 • Implementation:0 码力 | 8 页 | 2.19 MB | 5 月前3Design patterns for error handling in C++ programs using parallel algorithms and executors
Design patterns for error handling in C++ programs using parallel algorithms and executors Mark Hoemmen* mhoemmen@stellarscience.com CppCon 2020 * hoʊ’mən, or hœm’mən; he/himWho am I? • > 10 years 2017 • Started new job at Stellar Science in March Eschew raw pointersOutline • Parallelism makes error handling harder… • …C++ parallel algorithms and tasks specifically • Message Passing Interface (MPI): Responsiveness ILLIAC IV: the 1st massively parallel computer (image: Steve Jurvetson)Parallel hinders error handling • … because parallelism relaxes execution order – Deliberately, to improve performance0 码力 | 32 页 | 883.27 KB | 5 月前3Conan 1.3 Documentation
If the binary package necessary for some given settings doesn’t exist, Conan client will throw an error. It is possible to try to build the binary package from sources with the --build=missing command line description based on the Bincrafters community blog. The local workflow encourages users to do trial-and-error in a local sub-directory relative to their recipe, much like how developers typically test building tall --build- ˓→folder=tmp/build Project: Running build() ... Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:03.34 This is pretty strightforward, but it does add a very helpful new shortcut0 码力 | 397 页 | 2.77 MB | 1 年前3Conan 1.7 Documentation
generate the requested files specified in the [generators] section. The Conan client will throw an error If the binary package required for specific settings doesn’t exist. It is possible to try to build import platform def system(command): retcode = os.system(command) if retcode != 0: raise Exception("Error while executing:\n\t %s" % command) if __name__ == "__main__": params = " ".join(sys.argv[1:]) if You can easily add any remote. To run a remote on your machine: $ conan remote add my_local_server http://localhost:9300 You can search any remote in the same way you search your computer. Actually, many0 码力 | 433 页 | 2.95 MB | 1 年前3Conan 1.6 Documentation
If the binary package necessary for some given settings doesn’t exist, Conan client will throw an error. It is possible to try to build the binary package from sources with the --build=missing command line import platform def system(command): retcode = os.system(command) if retcode != 0: raise Exception("Error while executing:\n\t %s" % command) if __name__ == "__main__": params = " ".join(sys.argv[1:]) if remote easily. For a remote running in your machine, you could run: $ conan remote add my_local_server http://localhost:9300 You can search any remote in the same way you search your computer. Actually, many0 码力 | 428 页 | 2.87 MB | 1 年前3Conan 1.5 Documentation
If the binary package necessary for some given settings doesn’t exist, Conan client will throw an error. It is possible to try to build the binary package from sources with the --build=missing command line import platform def system(command): retcode = os.system(command) if retcode != 0: raise Exception("Error while executing:\n\t %s" % command) if __name__ == "__main__": params = " ".join(sys.argv[1:]) if remote easily. For a remote running in your machine, you could run: $ conan remote add my_local_server http://localhost:9300 You can search any remote in the same way you search your computer. Actually, many0 码力 | 422 页 | 2.85 MB | 1 年前3Conan 1.4 Documentation
If the binary package necessary for some given settings doesn’t exist, Conan client will throw an error. It is possible to try to build the binary package from sources with the --build=missing command line import platform def system(command): retcode = os.system(command) if retcode != 0: raise Exception("Error while executing:\n\t %s" % command) if __name__ == "__main__": params = " ".join(sys.argv[1:]) if remote easily. For a remote running in your machine, you could run: $ conan remote add my_local_server http://localhost:9300 You can search any remote in the same way you search your computer. Actually, many0 码力 | 421 页 | 2.84 MB | 1 年前3
共 285 条
- 1
- 2
- 3
- 4
- 5
- 6
- 29