Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::TaskErrorManager Class Reference
Collaboration diagram for duckdb::TaskErrorManager:

Public Member Functions

void PushError (ErrorData error)
 
ErrorData GetError ()
 
bool HasError ()
 
void ThrowException ()
 
void Reset ()
 

Private Attributes

mutex error_lock
 
vector< ErrorDataexceptions
 Exceptions that occurred during the execution of the current query.
 
atomic< bool > has_error
 Lock-free error flag.
 

Constructor & Destructor Documentation

◆ TaskErrorManager()

duckdb::TaskErrorManager::TaskErrorManager ( )
inline
19840 : has_error(false) {
19841 }
atomic< bool > has_error
Lock-free error flag.
Definition duckdb.hpp:19882

Member Function Documentation

◆ PushError()

void duckdb::TaskErrorManager::PushError ( ErrorData  error)
inline
19843 {
19844 lock_guard<mutex> elock(error_lock);
19845 this->exceptions.push_back(std::move(error));
19846 has_error = true;
19847 }
vector< ErrorData > exceptions
Exceptions that occurred during the execution of the current query.
Definition duckdb.hpp:19880

◆ GetError()

ErrorData duckdb::TaskErrorManager::GetError ( )
inline
19849 {
19850 lock_guard<mutex> elock(error_lock);
19851 D_ASSERT(!exceptions.empty());
19852
19853 // FIXME: Should we try to get the biggest priority error?
19854 // In case the first exception is a StandardException but a regular Exception or a FatalException occurred
19855 // Maybe we should throw the more critical exception instead, as that changes behavior.
19856 auto &entry = exceptions[0];
19857 return entry;
19858 }

◆ HasError()

bool duckdb::TaskErrorManager::HasError ( )
inline
19860 {
19861 return has_error;
19862 }

◆ ThrowException()

void duckdb::TaskErrorManager::ThrowException ( )
inline
19864 {
19865 lock_guard<mutex> elock(error_lock);
19866 D_ASSERT(!exceptions.empty());
19867 auto &entry = exceptions[0];
19868 entry.Throw();
19869 }

◆ Reset()

void duckdb::TaskErrorManager::Reset ( )
inline
19871 {
19872 lock_guard<mutex> elock(error_lock);
19873 exceptions.clear();
19874 has_error = false;
19875 }

The documentation for this class was generated from the following file: