NAME ^

src/warnings.c - Warning and error reporting

DESCRIPTION ^

Parrot STRING and C string versions of a function to print warning/error messages.

Internal Functions ^

static int find_line(Interp *interpreter, struct PackFile_Debug *debug)

Find the line number.

Returns -2 if the interpreter has no current profile counter.

What does returning -1 mean?

void print_pbc_location(Parrot_Interp interpreter)

Prints the bytecode location of the warning or error to PIO_STDERR.

void print_pbc_location_stdio(Parrot_Interp interpreter)

Prints the bytecode location of the warning or error to stderr.

Uses fprintf() only. This may be called from exceptions.

static INTVAL print_warning(Interp *interpreter, STRING *msg)

Prints the warning message and the bytecode location.

Parrot Warnings Interface ^

INTVAL Parrot_warn(Interp *interpreter, INTVAL warnclass, const char *message, ...)

The Parrot C string warning/error reporter.

Returns 2 on error, 1 on success.

message, .. can be a Parrot_vsprintf_c() format with arguments.

INTVAL Parrot_warn_s(Interp *interpreter, INTVAL warnclass, STRING *message, ...)

The Parrot STRING warning/error reporter.

Returns 2 on error, 1 on success.

message, .. can be a Parrot_vsprintf_s() format with arguments.

SEE ALSO ^

include/parrot/warnings.h.


parrot