1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Appended fields

This commit is contained in:
Brian Fiete 2022-06-27 10:55:31 -07:00
parent 52544e6782
commit 1d2811f50d
22 changed files with 596 additions and 52 deletions

View file

@ -86,6 +86,7 @@ namespace bf
BFRT_EXPORT static void ObjectDynCheck(Object* object, int typeId, bool allowNull);
BFRT_EXPORT static void ObjectDynCheckFailed(Object* object, int typeId);
BFRT_EXPORT static void ThrowIndexOutOfRange(intptr stackOffset);
BFRT_EXPORT static void ThrowObjectNotInitialized(intptr stackOffset);
BFRT_EXPORT static void FatalError(String* error, intptr stackOffset = 0);
BFRT_EXPORT static void MemCpy(void* dest, void* src, intptr length);
BFRT_EXPORT static void MemMove(void* dest, void* src, intptr length);
@ -423,6 +424,30 @@ void Internal::ThrowIndexOutOfRange(intptr stackOffset)
Internal_FatalError("Index out of range");
}
void Internal::ThrowObjectNotInitialized(intptr stackOffset)
{
if (gClientPipe != NULL)
{
if (gTestBreakOnFailure)
{
SETUP_ERROR("Object not initialized", (int)(2 + stackOffset));
BF_DEBUG_BREAK();
}
Beefy::String str = ":TestFail\tObject not initialized\n";
TestString(str);
exit(1);
}
if ((stackOffset != -1) && (::IsDebuggerPresent()))
{
SETUP_ERROR("Object not initialized", (int)(2 + stackOffset));
BF_DEBUG_BREAK();
}
Internal_FatalError("Object not initialized");
}
void Internal::FatalError(bf::System::String* error, intptr stackOffset)
{
if (gClientPipe != NULL)