OpenClonk
NeedObjectContext Class Reference

#include <C4AulDefFunc.h>

Inheritance diagram for NeedObjectContext:
[legend]
Collaboration diagram for NeedObjectContext:
[legend]

Public Member Functions

 NeedObjectContext (const char *function)
 
const char * what () const noexcept override
 

Protected Attributes

StdCopyStrBuf sMessage
 

Detailed Description

Definition at line 80 of file C4AulDefFunc.h.

Constructor & Destructor Documentation

◆ NeedObjectContext()

NeedObjectContext::NeedObjectContext ( const char *  function)
inline

Definition at line 83 of file C4AulDefFunc.h.

83 : C4AulExecError(FormatString("%s: must be called from object context", function).getData()) {}
C4AulExecError(const char *szError)
Definition: C4AulExec.cpp:31
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:270

Member Function Documentation

◆ what()

const char * C4AulError::what ( ) const
overridenoexceptinherited

Definition at line 59 of file C4Aul.cpp.

Referenced by C4PropList::Call(), C4AulFunc::CheckParTypes(), C4AulExec::ClearPointers(), C4AulExec::DirectExec(), C4AulCompiler::ConstexprEvaluator::eval(), C4AulCompiler::ConstexprEvaluator::eval_static(), C4AulScriptEngine::Link(), C4AulCompiler::PreparseAstVisitor::visit(), and C4AulCompiler::ConstantResolver::visit().

60 {
61  return sMessage ? sMessage.getData() : "(unknown error)";
62 }
const char * getData() const
Definition: StdBuf.h:442
StdCopyStrBuf sMessage
Definition: C4Aul.h:44
Here is the caller graph for this function:

Member Data Documentation

◆ sMessage

StdCopyStrBuf C4AulError::sMessage
protectedinherited

Definition at line 44 of file C4Aul.h.

Referenced by C4AulExecError::C4AulExecError().


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