mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Move binpac code into the main Zeek repository
This is based on commit 48f75b5f6415fe9d597e3e991cec635b1bc400dc from the binpac repository.
This commit is contained in:
parent
a2680d5eca
commit
ff26835976
112 changed files with 14586 additions and 8 deletions
102
tools/binpac/src/pac_exception.h
Normal file
102
tools/binpac/src/pac_exception.h
Normal file
|
@ -0,0 +1,102 @@
|
|||
#ifndef pac_exception_h
|
||||
#define pac_exception_h
|
||||
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#include "pac_common.h"
|
||||
|
||||
class Exception {
|
||||
public:
|
||||
Exception(const Object* o, string msg = "");
|
||||
|
||||
const char* msg() const { return msg_.c_str(); }
|
||||
void append(string s) { msg_ += s; }
|
||||
|
||||
private:
|
||||
string msg_;
|
||||
};
|
||||
|
||||
class ExceptionIDNotFound : public Exception {
|
||||
public:
|
||||
ExceptionIDNotFound(const ID* id);
|
||||
const ID* id() const { return id_; }
|
||||
|
||||
private:
|
||||
const ID* id_;
|
||||
};
|
||||
|
||||
class ExceptionIDRedefinition : public Exception {
|
||||
public:
|
||||
ExceptionIDRedefinition(const ID* id);
|
||||
const ID* id() const { return id_; }
|
||||
|
||||
private:
|
||||
const ID* id_;
|
||||
};
|
||||
|
||||
class ExceptionIDNotEvaluated : public Exception {
|
||||
public:
|
||||
ExceptionIDNotEvaluated(const ID* id);
|
||||
const ID* id() const { return id_; }
|
||||
|
||||
private:
|
||||
const ID* id_;
|
||||
};
|
||||
|
||||
class ExceptionCyclicDependence : public Exception {
|
||||
public:
|
||||
ExceptionCyclicDependence(const ID* id);
|
||||
const ID* id() const { return id_; }
|
||||
|
||||
private:
|
||||
const ID* id_;
|
||||
};
|
||||
|
||||
class ExceptionPaddingError : public Exception {
|
||||
public:
|
||||
ExceptionPaddingError(const Object* o, string msg);
|
||||
};
|
||||
|
||||
class ExceptionIDNotField : public Exception {
|
||||
public:
|
||||
ExceptionIDNotField(const ID* id);
|
||||
const ID* id() const { return id_; }
|
||||
|
||||
private:
|
||||
const ID* id_;
|
||||
};
|
||||
|
||||
class ExceptionMemberNotFound : public Exception {
|
||||
public:
|
||||
ExceptionMemberNotFound(const ID* type_id, const ID* member_id);
|
||||
|
||||
private:
|
||||
const ID *type_id_, *member_id_;
|
||||
};
|
||||
|
||||
class ExceptionNonConstExpr : public Exception {
|
||||
public:
|
||||
ExceptionNonConstExpr(const Expr* expr);
|
||||
|
||||
private:
|
||||
const Expr* expr;
|
||||
};
|
||||
|
||||
class ExceptionInvalidCaseSizeExpr : public Exception {
|
||||
public:
|
||||
ExceptionInvalidCaseSizeExpr(const Expr* expr);
|
||||
|
||||
private:
|
||||
const Expr* expr;
|
||||
};
|
||||
|
||||
class ExceptionInvalidCaseLimitExpr : public Exception {
|
||||
public:
|
||||
ExceptionInvalidCaseLimitExpr(const Expr* expr);
|
||||
|
||||
private:
|
||||
const Expr* expr;
|
||||
};
|
||||
|
||||
#endif /* pac_exception_h */
|
Loading…
Add table
Add a link
Reference in a new issue