Created
April 21, 2017 15:39
-
-
Save Naios/76d7b8a8c286f7ef9daabd23122c38eb to your computer and use it in GitHub Desktop.
Custom error category
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class process_error_category : public std::error_category { | |
public: | |
using error_category::error_category; | |
const char* name() const noexcept override { | |
return ""; | |
} | |
std::string message(int _Errval) const override { | |
return ""; | |
} | |
}; | |
static std::error_condition error_of() { | |
static process_error_category const cat; | |
return std::error_condition(5, cat); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment