minilua::BadArgumentError class

Exception indicating a bad argument of a function call.

This is usually thrown when validating an argument.

The interpreter has special code to format this exception and print the name of the called function.

Base classes

class InterpreterException
Exception thrown by the interpreter.

Constructors, destructors, conversion operators

BadArgumentError(int index, const std::string& message)
Create a new BadArgumentError.

Public functions

auto with(const std::string& function_name, StackItem item) const -> InterpreterException -> auto
Create a new exception with the given function name and stack item.

Function documentation

minilua::BadArgumentError::BadArgumentError(int index, const std::string& message)

Create a new BadArgumentError.

Parameters
index The index of the bad argument (starting with 1)
message Error information for the bad argument