Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/exploits/CVE-2017-13861/liboffsetfinder64/exception.hpp
Views: 11784
//1// exception.hpp2// liboffsetfinder643//4// Created by tihmstar on 09.03.18.5// Copyright © 2018 tihmstar. All rights reserved.6//78#ifndef exception_hpp9#define exception_hpp1011#include <string>1213namespace tihmstar {14class exception : public std::exception{15std::string _err;16int _code;17std::string _build_commit_count;18std::string _build_commit_sha;19std::string _filename;20public:21exception(int code, std::string err, std::string filename);2223//custom error can be used24const char *what();2526/*27-first lowest two bytes of code is sourcecode line28-next two bytes is strlen of filename in which error happened29*/30int code() const;3132//Information about build33const std::string& build_commit_count() const;34const std::string& build_commit_sha() const;35};3637//custom exceptions for makeing it easy to catch38class out_of_range : public exception{39public:40out_of_range(std::string err);41};4243class symbol_not_found : public exception{44public:45symbol_not_found(int code, std::string sym, std::string filename);46};4748class load_command_not_found : public exception{49int _cmd;50public:51int cmd() const;52load_command_not_found(int code, int cmd, std::string filename);53};5455class symtab_not_found : public exception{56public:57symtab_not_found(int code, std::string err, std::string filename);58};5960class limit_reached : public exception{61public:62limit_reached(int code, std::string err, std::string filename);63};6465class bad_branch_destination : public exception{66public:67bad_branch_destination(int code, std::string err, std::string filename);68};6970};7172#endif /* exception_hpp */737475