Skip to content

Commit

Permalink
Add exception to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaowang1998 committed Nov 20, 2024
1 parent fe23c3c commit 064edd8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/spider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ set(SPIDER_CLIENT_SHARED_HEADERS
client/Driver.hpp
client/Context.hpp
client/TaskGraph.hpp
client/Exception.hpp
CACHE INTERNAL
"spider client shared header files"
)
Expand Down
19 changes: 19 additions & 0 deletions src/spider/client/Exception.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef SPIDER_CLIENT_EXCEPTION_HPP
#define SPIDER_CLIENT_EXCEPTION_HPP

#include <cstdint>
#include <exception>

namespace spider {

enum class ExceptionCode: std::uint8_t {
ConnectionError,

};

struct SpiderException: std::exception {
ExceptionCode code;
};

}
#endif // SPIDER_CLIENT_EXCEPTION_HPP

0 comments on commit 064edd8

Please sign in to comment.