21#ifndef PDDL_EXCEPTION_H
22#define PDDL_EXCEPTION_H
26#include <core/exception.h>
27#include <core/threading/mutex.h>
31namespace pddl_parser {
58 while (curr_msg != NULL) {
64 curr_msg = curr_msg->next;
75 what()
const throw()
override
80 return "Unknown Error";
Base class for exceptions in Fawkes.
Mutex * messages_mutex
Mutex to protect operations on messages list.
message_list_t * messages_end
Pointer that points to the very last message.
message_list_t * messages
List of messages.
Exception() noexcept
Constructor for subclasses.
void lock()
Lock this mutex.
void unlock()
Unlock the mutex.
Exception thrown by the parser if a declared constant does not match a defined one.
Exception thrown by the parser if an expression is invalid.
Exception thrown by the parser if a parameter mismatch is encountered.
Exception thrown by the parser if an error occurs during parsing.
PddlParserException(const std::string &msg)
Constructor with a string message.
const char * what() const override
Get primary string.
void collapse_msg()
Merge all error messages to a single one.
PddlParserException(const char *msg)
Constructor.
Exception thrown by the parser if a declared relation does not match the defined predicate.
Exception thrown by the parser if an error occurs during semantic checks during parsing.
PddlSemanticsException(const std::string &msg, const iterator_type &pos)
Constructor with a string message.
const iterator_type pos
Position of the error to generate a helpful error message.
PddlSemanticsException(const char *msg, const iterator_type &pos)
Constructor.
Exception thrown by the parser if there is a syntax error.
Exception thrown by the parser if declared type does not match the defined one.
Fawkes library namespace.
message_list_t * next
pointer to next element, NULL if last element
char * msg
pointer to message, may not be NULL, will be freed in dtor