| 1 | // Copyright (C) Microsoft Corporation. All rights reserved. |
| 2 | #pragma once |
| 3 | |
| 4 | #include "RuntimeErrorWithSourceLocation.h" |
| 5 | |
| 6 | class SyscallError : public RuntimeErrorWithSourceLocation |
| 7 | { |
| 8 | public: |
| 9 | SyscallError(const std::string& method, const std::string& arguments, int err, const std::source_location& source); |
| 10 | |
| 11 | static std::string BuildMessage(const std::string& method, const std::string& arguments, int err); |
| 12 | |
| 13 | int GetErrno() const; |
| 14 | |
| 15 | private: |
| 16 | int savedErrno; |
| 17 | }; |