31 lines
699 B
C++
31 lines
699 B
C++
#ifndef __ANTHEM__UTILS_H
|
|
#define __ANTHEM__UTILS_H
|
|
|
|
#include <iostream>
|
|
|
|
#include <clingo.hh>
|
|
|
|
namespace anthem
|
|
{
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Utils
|
|
//
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
inline void throwErrorAtLocation(const Clingo::Location &location, const char *errorMessage)
|
|
{
|
|
std::cerr
|
|
<< location.begin_file() << ":"
|
|
<< location.begin_line() << ":" << location.begin_column()
|
|
<< ": error: "
|
|
<< errorMessage << std::endl;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
}
|
|
|
|
#endif
|