mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-10 13:48:40 +01:00
19 lines
350 B
C
19 lines
350 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "error.h"
|
|
|
|
static void runtimeError(WrenVM* vm)
|
|
{
|
|
wrenEnsureSlots(vm, 1);
|
|
wrenSetSlotString(vm, 0, "Error!");
|
|
wrenAbortFiber(vm, 0);
|
|
}
|
|
|
|
WrenForeignMethodFn errorBindMethod(const char* signature)
|
|
{
|
|
if (strcmp(signature, "static Error.runtimeError") == 0) return runtimeError;
|
|
|
|
return NULL;
|
|
}
|