로딩중...
검색중...
일치하는것 없음
by::baseErr 클래스 참조abstract

Base class for error hierarchy 더 자세히 ...

#include <baseErr.hpp>

by::baseErr에 대한 상속 다이어그램 :
by::baseObj by::errorable by::node by::statable by::dumpable by::instance by::frameInteractable by::typeProvidable by::clonable by::err by::nerr by::ndummyErr

Public 멤버 함수

 baseErr (errLv::level t)
 
 baseErr (const baseErr &rhs)
 
me & operator= (const me &rhs)
 
virtual nbool operator== (const me &rhs) const =0
 
nbool operator!= (const me &rhs) const
 
const framesgetFrames () const
 
void logStack () const override
 Log error with stack trace
 
void dump () const override
 Dump object state for debugging
 
errLv::level getLv () const override
 
const std::string & getMsg () const override
 
virtual errCode getErrCode () const
 
- by::baseObj(으)로부터 상속된 Public 멤버 함수
str eval (const args &a) override
 
scopesubs () override
 
state getState () const override
 
void setState (state new1) override
 
priorType prioritize (const args &a) const override
 
virtual const baseObjgetOrigin () const
 
void inFrame (const bicontainable *args) const override
 
void outFrame () const override
 
const srcgetSrc () const override
 
virtual const nodegetSubPod () const
 Retrieves a sub-pod represented as a node.
 
virtual baseObjmake () const
 
const modifiergetModifier () const override
 
- by::node(으)로부터 상속된 Public 멤버 함수
me & operator[] (const std::string &name)
 
const me & operator[] (const std::string &name) const BY_CONST_FUNC(operator[](name))
 
me & operator[] (const std::string *it)
 
const me & operator[] (const std::string *it) const BY_CONST_FUNC(operator[](it))
 
me & operator[] (const nchar *name)
 
const me & operator[] (const nchar *name) const BY_CONST_FUNC(operator[](name))
 
nbool in (const node &elem) const
 
nbool in (const node *elem) const
 
const scopesubs () const BY_CONST_FUNC(subs()) virtual tstr< nbicontainer > mySubs() const
 Returns a tstr to a container of immediate sub-nodes (excluding inherited or chained ones).
 
const nodepromote (const node &it) const
 
const nodepromote (const node *it) const BY_SIDE_FUNC(promote)
 
template<typename T >
T * sub (std::function< nbool(const std::string &, const T &)> l)
 
template<typename T >
const T * sub (std::function< nbool(const std::string &, const T &)> l) const BY_CONST_FUNC(sub< T >(l)) template< typename T
 
template<typename T = me>
const T * sub () const BY_CONST_FUNC(sub< T >()) template< typename T
 
template<typename T = me>
T * sub (const std::string *it) BY_SIDE_FUNC(sub)
 
template<typename T = me>
const T * sub (const std::string &name) const BY_CONST_FUNC(sub< T >(name)) template< typename T
 
template<typename T = me>
T * sub (const std::string *name, const args &a) BY_SIDE_FUNC(name
 
template<typename T = me>
const T * sub (const std::string &name, const args &a) const BY_CONST_FUNC(sub< T >(name
 
template<typename T = me>
const T a const T * sub (const std::string *name, const args &a) const BY_CONST_FUNC(sub< T >(name
 
template<typename T >
const T a const T a tnarr< T, strTacticsubAll (std::function< nbool(const std::string &, const T &)> l) const
 
template<typename T = me>
tnarr< T, strTacticsubAll () const
 
template<typename T = me>
tpriorities< T > subAll (const std::string &name) const
 
template<typename T = me>
tpriorities< T > subAll (const std::string *it) const BY_SIDE_FUNC(subAll< T >) template< typename T
 
template<typename T = me>
tpriorities< T > subAll (const std::string &name, const args &a) const
 
template<typename T = me>
tpriorities< T > subAll (const std::string *name, const args *a) const BY_SIDE_FUNC(name
 
tpriorities< T > subAll< T > tpriorities ())
 
template<typename T = me>
tpriorities< T > subAll (const std::string *name, const args &a) const BY_SIDE_FUNC(name
 
tpriorities< T > subAll< T > tpriorities ())
 
bool canEval (const args &a) const
 
priorType prioritize (const args *it) const BY_SIDE_FUNC(it
 
str eval (const args *it) BY_SIDE_FUNC(eval)
 
str eval (const std::string &name, const args &a)
 
str eval (const std::string &name, const args *a) BY_SIDE_FUNC(a
 
str eval (name, a)
 
str str ())
 
str eval (const std::string *name, const args &a) BY_SIDE_FUNC(name
 
str eval str ())
 
str eval (const std::string *name, const args *a) BY_SIDE_FUNC(name &&a
 
str eval str ())
 
str eval (const std::string &name)
 
str eval (const std::string *it) BY_SIDE_FUNC(eval)
 
str eval ()
 
virtual void rel ()
 
template<typename T >
nbool is () const
 
nbool is (const typeProvidable &to) const
 
nbool is (const typeProvidable *it) const BY_SIDE_FUNC(is)
 
nbool is (const type &to) const
 
nbool is (const type *it) const BY_SIDE_FUNC(is)
 
template<typename T >
tstr< T > as () const
 
str as (const typeProvidable &to) const
 
str as (const typeProvidable *it) const BY_SIDE_FUNC(as)
 
str as (const type &to) const
 
str as (const type *it) const BY_SIDE_FUNC(as)
 
template<typename T >
nbool isImpli () const
 
virtual nbool isImpli (const type &to) const
 
nbool isImpli (const typeProvidable &to) const
 
nbool isImpli (const typeProvidable *it) const BY_SIDE_FUNC(isImpli)
 
template<typename T >
tstr< T > asImpli () const
 
virtual str asImpli (const type &to) const
 
str asImpli (const typeProvidable &to) const
 
str asImpli (const typeProvidable *it) const BY_SIDE_FUNC(asImpli)
 
virtual nbool isComplete () const
 
virtual str infer () const
 
virtual void accept (const visitInfo &i, visitor &v)
 
void inFrame (const bicontainable *args) const override
 
void outFrame () const override
 
virtual void inFrame (const bicontainable *args) const=0
 
void inFrame () const
 
virtual void outFrame () const=0
 
- by::instance(으)로부터 상속된 Public 멤버 함수
 instance (id newId)
 
 instance (const me &rhs)
 
me & operator= (const me &rhs)=default
 
void * operator new (size_t sz) noexcept
 
void operator delete (void *pt, size_t sz) noexcept
 
virtual id getId () const
 
virtual nbool isHeap () const
 Checks if this instance is allocated on the heap.
 
const lifegetBindTag () const
 Returns a pointer to the associated life object for reference counting.
 
- by::typeProvidable(으)로부터 상속된 Public 멤버 함수
nbool operator== (const me &rhs) const
 
nbool operator!= (const me &rhs) const
 
virtual const typegetType () const =0
 
nbool isSub (const type &it) const
 
nbool isSub (const type *it) const BY_SIDE_FUNC(isSub)
 
nbool isSub (const me &it) const
 
nbool isSub (const me *it) const BY_SIDE_FUNC(isSub)
 
nbool isSuper (const type &it) const
 
nbool isSuper (const type *it) const BY_SIDE_FUNC(isSuper)
 
nbool isSuper (const me &it) const
 
nbool isSuper (const me *it) const BY_SIDE_FUNC(isSuper)
 
template<typename T >
nint isSub () const
 
template<typename T >
nint isSuper () const
 
template<typename T >
T * cast ()
 
template<typename T >
const T * cast () const BY_CONST_FUNC(cast< T >()) virtual void *cast(const type &to)
 Safe cast to target type using type hierarchy information
 
const void * cast (const type &to) const BY_CONST_FUNC(cast(to)) void *cast(const type *it) BY_SIDE_FUNC(cast)
 
- by::clonable(으)로부터 상속된 Public 멤버 함수
virtual me * clone () const =0
 
virtual me * cloneDeep () const
 
virtual void onCloneDeep (const me &from)
 
- by::frameInteractable(으)로부터 상속된 Public 멤버 함수
void inFrame () const
 
- by::errorable(으)로부터 상속된 Public 멤버 함수
virtual void log () const =0
 Log error message
 
void dbgLog () const
 Log error in debug mode only
 
const std::string & getLevelName () const
 Get human-readable error level name
 

정적 Public 멤버 함수

static scopemakeSubs ()
 
- by::instance(으)로부터 상속된 정적 Public 멤버 함수
static vaultgetVault ()
 

Friends

template<typename T , nbool >
struct tmarshaling
 

추가로 상속된 멤버들

- by::node(으)로부터 상속된 Public 속성
T sub name
 
T sub nullptr
 
tpriorities< T > subAll< T > name
 
priorType prioritize it
 
priorType prioritize NO_MATCH
 
str eval name
 
- by::baseObj(으)로부터 상속된 정적 Public 속성
static const std::string COMMON_NAME = "@common"
 
static const std::string EXPAND_NAME = "@expand"
 
- by::baseObj(으)로부터 상속된 Protected 멤버 함수
 baseObj ()=default
 Default constructor for baseObj.
 
 baseObj (const baseObj *org, nbool isScripted)
 Constructs a baseObj from an existing origin object.
 
str _onEvalSub (node &sub, const args &a) override
 Protected virtual method for evaluating a sub-node.
 
void _setSrc (const src &s) override
 
virtual void _inFrame (frame &fr, const bicontainable *args) const
 Enters this object's frame into the current execution stack.
 
virtual void _setType (const mgdType &new1)
 Sets the script type for this base object.
 
virtual void _setModifier (const modifier &mod)
 
virtual str _onBeforeCtor ()
 Hook method called before the object's constructor is fully executed.
 
- by::node(으)로부터 상속된 Protected 멤버 함수
void _setSrc (const src *it) BY_SIDE_FUNC(_setSrc)
 
- by::instance(으)로부터 상속된 Protected 멤버 함수
nbool _setId (id new1)
 
- by::instance(으)로부터 상속된 정적 Protected 멤버 함수
static instancer_getMgr ()
 
- by::baseObj(으)로부터 상속된 Protected 속성
tstr< baseObj_org
 

상세한 설명

Base class for error hierarchy

The base class of the byeol language err class hierarchy. Includes common logic and interfaces for error handling.

Error Concept vs Implementation Gap

Byeol's grammar distinguishes two types of errors. One is known error represented by ?, and the other is exception - cases where errors are returned without being specified as an errorable type. However, in implementation, both are completely identical error objects. Errors are only distinguished by their origin: nerr generated by parser or verifier in native environment, and err generated by byeol code.

err has Strong Reference to frames

Uses this frame to provide callstack information. As explained in frame, frame is created by baseObj during function calls. Later, frame is del()ed by frames, only losing strong references but not immediately deleted from heap. (In this project, it's extremely rare to directly new/delete on heap without reference counting via tstr from the memlite module.) Therefore, as long as err lives, the referenced frame data is also maintained.

Remarks
err is closely related to errReport. See it if curious.

nerr is Mainly Created by core_when

nerr is primarily created by core module's __core_when__. Code looks like this:

WHEN_NUL(stmt).exErr(IS_NUL, getReport(), "stmt").ret(blk);
Weak reference smart pointer with type-safe access
Definition tweak.hpp:16

The above code means if stmt is nullptr, the IS_NUL error is added to the errReport object returned by getReport(), and the function terminates while returning blk.

Dumpable and Log

Logs use the clog module to log the error. Meanwhile, dump() exposes as much information as possible including callstack.

errCode

nerr is managed by errCode for management purposes. nerr is mainly generated by parser or verifier, which helps easily search detailed information by giving codes like Err2203 along with code 2203 when syntax errors occur. errCode also simply defines description strings as literal constants for reference.

멤버 함수 문서화

◆ dump()

void by::baseErr::dump ( ) const
overridevirtual

Dump object state for debugging

by::dumpable를 구현.

◆ getLv()

errLv::level by::baseErr::getLv ( ) const
overridevirtual

by::errorable를 구현.

◆ getMsg()

const std::string & by::baseErr::getMsg ( ) const
overridevirtual

by::errorable를 구현.

◆ logStack()

void by::baseErr::logStack ( ) const
overridevirtual

Log error with stack trace

by::errorable를 구현.

by::nerr에서 재구현되었습니다.


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.:
to Top