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::BinderException Class Reference
Inheritance diagram for duckdb::BinderException:
Collaboration diagram for duckdb::BinderException:

Public Member Functions

DUCKDB_API BinderException (const string &msg)
 
DUCKDB_API BinderException (const unordered_map< string, string > &extra_info, const string &msg)
 
template<typename... ARGS>
 BinderException (const string &msg, ARGS &&...params)
 
template<typename... ARGS>
 BinderException (const TableRef &ref, const string &msg, ARGS &&...params)
 
template<typename... ARGS>
 BinderException (const ParsedExpression &expr, const string &msg, ARGS &&...params)
 
template<typename... ARGS>
 BinderException (const Expression &expr, const string &msg, ARGS &&...params)
 
template<typename... ARGS>
 BinderException (QueryErrorContext error_context, const string &msg, ARGS &&...params)
 
template<typename... ARGS>
 BinderException (optional_idx error_location, const string &msg, ARGS &&...params)
 
- Public Member Functions inherited from duckdb::Exception
DUCKDB_API Exception (ExceptionType exception_type, const string &message)
 
DUCKDB_API Exception (const unordered_map< string, string > &extra_info, ExceptionType exception_type, const string &message)
 

Static Public Member Functions

static BinderException ColumnNotFound (const string &name, const vector< string > &similar_bindings, QueryErrorContext context=QueryErrorContext())
 
static BinderException NoMatchingFunction (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const vector< string > &candidates)
 
static BinderException Unsupported (ParsedExpression &expr, const string &message)
 
- Static Public Member Functions inherited from duckdb::Exception
static DUCKDB_API string ExceptionTypeToString (ExceptionType type)
 
static DUCKDB_API ExceptionType StringToExceptionType (const string &type)
 
template<typename... ARGS>
static string ConstructMessage (const string &msg, ARGS const &...params)
 
static DUCKDB_API unordered_map< string, string > InitializeExtraInfo (const Expression &expr)
 
static DUCKDB_API unordered_map< string, string > InitializeExtraInfo (const ParsedExpression &expr)
 
static DUCKDB_API unordered_map< string, string > InitializeExtraInfo (const QueryErrorContext &error_context)
 
static DUCKDB_API unordered_map< string, string > InitializeExtraInfo (const TableRef &ref)
 
static DUCKDB_API unordered_map< string, string > InitializeExtraInfo (optional_idx error_location)
 
static DUCKDB_API unordered_map< string, string > InitializeExtraInfo (const string &subtype, optional_idx error_location)
 
static DUCKDB_API bool IsExecutionError (ExceptionType type)
 Whether this exception type can occur during execution of a query.
 
static DUCKDB_API string ToJSON (ExceptionType type, const string &message)
 
static DUCKDB_API string ToJSON (const unordered_map< string, string > &extra_info, ExceptionType type, const string &message)
 
static DUCKDB_API bool InvalidatesTransaction (ExceptionType exception_type)
 
static DUCKDB_API bool InvalidatesDatabase (ExceptionType exception_type)
 
static DUCKDB_API string ConstructMessageRecursive (const string &msg, std::vector< ExceptionFormatValue > &values)
 
template<class T , typename... ARGS>
static string ConstructMessageRecursive (const string &msg, std::vector< ExceptionFormatValue > &values, const T &param, ARGS &&...params)
 
static DUCKDB_API bool UncaughtException ()
 
static DUCKDB_API string GetStackTrace (idx_t max_depth=120)
 
static string FormatStackTrace (const string &message="")
 
static DUCKDB_API void SetQueryLocation (optional_idx error_location, unordered_map< string, string > &extra_info)
 

Constructor & Destructor Documentation

◆ BinderException() [1/8]

duckdb::BinderException::BinderException ( const string &  msg)
explicit
70298 : Exception(ExceptionType::BINDER, msg) {
70299}

◆ BinderException() [2/8]

duckdb::BinderException::BinderException ( const unordered_map< string, string > &  extra_info,
const string &  msg 
)
explicit
70302 : Exception(extra_info, ExceptionType::BINDER, msg) {
70303}

◆ BinderException() [3/8]

template<typename... ARGS>
duckdb::BinderException::BinderException ( const string &  msg,
ARGS &&...  params 
)
inlineexplicit
26129 : BinderException(ConstructMessage(msg, std::forward<ARGS>(params)...)) {
26130 }

◆ BinderException() [4/8]

template<typename... ARGS>
duckdb::BinderException::BinderException ( const TableRef ref,
const string &  msg,
ARGS &&...  params 
)
inlineexplicit
26134 : BinderException(Exception::InitializeExtraInfo(ref), ConstructMessage(msg, std::forward<ARGS>(params)...)) {
26135 }

◆ BinderException() [5/8]

template<typename... ARGS>
duckdb::BinderException::BinderException ( const ParsedExpression expr,
const string &  msg,
ARGS &&...  params 
)
inlineexplicit
26138 : BinderException(Exception::InitializeExtraInfo(expr), ConstructMessage(msg, std::forward<ARGS>(params)...)) {
26139 }

◆ BinderException() [6/8]

template<typename... ARGS>
duckdb::BinderException::BinderException ( const Expression expr,
const string &  msg,
ARGS &&...  params 
)
inlineexplicit
26143 : BinderException(Exception::InitializeExtraInfo(expr), ConstructMessage(msg, std::forward<ARGS>(params)...)) {
26144 }

◆ BinderException() [7/8]

template<typename... ARGS>
duckdb::BinderException::BinderException ( QueryErrorContext  error_context,
const string &  msg,
ARGS &&...  params 
)
inlineexplicit
26148 : BinderException(Exception::InitializeExtraInfo(error_context),
26149 ConstructMessage(msg, std::forward<ARGS>(params)...)) {
26150 }

◆ BinderException() [8/8]

template<typename... ARGS>
duckdb::BinderException::BinderException ( optional_idx  error_location,
const string &  msg,
ARGS &&...  params 
)
inlineexplicit
26154 : BinderException(Exception::InitializeExtraInfo(error_location),
26155 ConstructMessage(msg, std::forward<ARGS>(params)...)) {
26156 }

Member Function Documentation

◆ ColumnNotFound()

BinderException duckdb::BinderException::ColumnNotFound ( const string &  name,
const vector< string > &  similar_bindings,
QueryErrorContext  context = QueryErrorContext() 
)
static
70306 {
70307 auto extra_info = Exception::InitializeExtraInfo("COLUMN_NOT_FOUND", context.query_location);
70308 string candidate_str = StringUtil::CandidatesMessage(similar_bindings, "Candidate bindings");
70309 extra_info["name"] = name;
70310 if (!similar_bindings.empty()) {
70311 extra_info["candidates"] = StringUtil::Join(similar_bindings, ",");
70312 return BinderException(extra_info, StringUtil::Format("Referenced column \"%s\" not found in FROM clause!%s",
70313 name, candidate_str));
70314 } else {
70315 return BinderException(
70316 extra_info,
70317 StringUtil::Format("Referenced column \"%s\" was not found because the FROM clause is missing", name));
70318 }
70319}
static DUCKDB_API string Join(const vector< string > &input, const string &separator)
Join multiple strings into one string. Components are concatenated by the given separator.
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002

◆ NoMatchingFunction()

BinderException duckdb::BinderException::NoMatchingFunction ( const string &  catalog_name,
const string &  schema_name,
const string &  name,
const vector< LogicalType > &  arguments,
const vector< string > &  candidates 
)
static
70323 {
70324 auto extra_info = Exception::InitializeExtraInfo("NO_MATCHING_FUNCTION", optional_idx());
70325 // no matching function was found, throw an error
70326 string call_str = Function::CallToString(catalog_name, schema_name, name, arguments);
70327 string candidate_str;
70328 for (auto &candidate : candidates) {
70329 candidate_str += "\t" + candidate + "\n";
70330 }
70331 extra_info["name"] = name;
70332 if (!catalog_name.empty()) {
70333 extra_info["catalog"] = catalog_name;
70334 }
70335 if (!schema_name.empty()) {
70336 extra_info["schema"] = schema_name;
70337 }
70338 extra_info["call"] = call_str;
70339 if (!candidates.empty()) {
70340 extra_info["candidates"] = StringUtil::Join(candidates, ",");
70341 }
70342 return BinderException(
70343 extra_info,
70344 StringUtil::Format("No function matches the given name and argument types '%s'. You might need to add "
70345 "explicit type casts.\n\tCandidate functions:\n%s",
70346 call_str, candidate_str));
70347}
static DUCKDB_API string CallToString(const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const LogicalType &varargs=LogicalType::INVALID)
Returns the formatted string name(arg1, arg2, ...)

◆ Unsupported()

BinderException duckdb::BinderException::Unsupported ( ParsedExpression expr,
const string &  message 
)
static
70349 {
70350 auto extra_info = Exception::InitializeExtraInfo("UNSUPPORTED", expr.GetQueryLocation());
70351 return BinderException(extra_info, message);
70352}

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