MySQL 26.7.0
Source Code Documentation
shcore::polyglot::anonymous_namespace{polyglot_error.cc} Namespace Reference

Functions

std::vector< std::string > filter_backtrace (const std::string &backtrace, std::string *header=nullptr, int *column=nullptr, std::string *src_line=nullptr)
 The backtrace may come from different sources: More...
 
std::string get_poly_exception_message (poly_thread thread, poly_exception exc, int *column=nullptr, std::string *src_line=nullptr, std::vector< std::string > *backtrace=nullptr)
 
std::vector< std::string > get_exception_stack_trace (poly_thread thread, poly_exception exc)
 

Variables

const char * k_key_type {"type"}
 
const char * k_key_backtrace {"backtrace"}
 
const char * k_key_source {"source"}
 
const char * k_key_line {"line"}
 
const char * k_key_column {"column"}
 
const char * k_key_source_line {"source_line"}
 
const char * k_key_code {"code"}
 

Function Documentation

◆ filter_backtrace()

std::vector< std::string > shcore::polyglot::anonymous_namespace{polyglot_error.cc}::filter_backtrace ( const std::string &  backtrace,
std::string *  header = nullptr,
int *  column = nullptr,
std::string *  src_line = nullptr 
)

The backtrace may come from different sources:

  • The shell itself (internal code, user code, processed scripts)
  • graalvm - non JavaScript specific
  • graalvm - JavaScript specific

This function will filter out the backtrace to only display the relevant elements to the user:

  • Excludes graalvm frames that are not JavaScript specific
  • Excludes shell internal frames

◆ get_exception_stack_trace()

std::vector< std::string > shcore::polyglot::anonymous_namespace{polyglot_error.cc}::get_exception_stack_trace ( poly_thread  thread,
poly_exception  exc 
)

◆ get_poly_exception_message()

std::string shcore::polyglot::anonymous_namespace{polyglot_error.cc}::get_poly_exception_message ( poly_thread  thread,
poly_exception  exc,
int *  column = nullptr,
std::string *  src_line = nullptr,
std::vector< std::string > *  backtrace = nullptr 
)

Variable Documentation

◆ k_key_backtrace

const char* shcore::polyglot::anonymous_namespace{polyglot_error.cc}::k_key_backtrace {"backtrace"}
inline

◆ k_key_code

const char* shcore::polyglot::anonymous_namespace{polyglot_error.cc}::k_key_code {"code"}
inline

◆ k_key_column

const char* shcore::polyglot::anonymous_namespace{polyglot_error.cc}::k_key_column {"column"}
inline

◆ k_key_line

const char* shcore::polyglot::anonymous_namespace{polyglot_error.cc}::k_key_line {"line"}
inline

◆ k_key_source

const char* shcore::polyglot::anonymous_namespace{polyglot_error.cc}::k_key_source {"source"}
inline

◆ k_key_source_line

const char* shcore::polyglot::anonymous_namespace{polyglot_error.cc}::k_key_source_line {"source_line"}
inline

◆ k_key_type

const char* shcore::polyglot::anonymous_namespace{polyglot_error.cc}::k_key_type {"type"}
inline