Skip to content

Commit

Permalink
Renamed NrtErrorHandling C API
Browse files Browse the repository at this point in the history
  • Loading branch information
bjauny committed Oct 22, 2023
1 parent eee55fc commit cfb08f0
Show file tree
Hide file tree
Showing 46 changed files with 362 additions and 362 deletions.
46 changes: 23 additions & 23 deletions include/NovelRT.Interop/NrtErrorHandling.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ extern "C"
{
#endif

const char* Nrt_getLastError();
const char* Nrt_GetLastError();

// Internal
const char* Nrt_getLastErrorInternal();
void Nrt_setErrMsgIsNullInstanceProvidedInternal();
void Nrt_setErrMsgIsNullArgumentProvidedInternal();
void Nrt_setErrMsgIsNaNInternal();
void Nrt_setErrMsgDupKeyGivenInternal();
void Nrt_setErrMsgCompilationErrorInternal();
void Nrt_setErrMsgIsFileNotFoundInternal();
void Nrt_setErrMsgIsDivideByZeroInternal();
void Nrt_setErrMsgIsAlreadyDeletedOrRemovedInternal();
void Nrt_setErrMsgIsNotSupportedInternal();
void Nrt_setErrMsgIsInitialisationFailureInternal();
void Nrt_setErrMsgIsFunctionNotFoundInternal();
void Nrt_setErrMsgIsNotInitialisedInternal();
void Nrt_setErrMsgIsArgumentOutOfRangeInternal();
void Nrt_setErrMsgIsInvalidOperationInternal();
void Nrt_setErrMsgIsCharacterNotFoundInternal();
void Nrt_setErrMsgIsOutOfMemoryInternal();
void Nrt_setErrMsgKeyNotFoundInternal();
void Nrt_setErrMsgRuntimeNotFoundInternal();
void Nrt_setErrMsgErrorUnknownInternal();
void Nrt_setErrMsgIsInvalidPathInternal();
void Nrt_setErrMsgCustomInternal(const char* message);
const char* Nrt_GetLastErrorInternal();
void Nrt_SetErrMsgIsNullInstanceProvidedInternal();
void Nrt_SetErrMsgIsNullArgumentProvidedInternal();
void Nrt_SetErrMsgIsNaNInternal();
void Nrt_SetErrMsgDupKeyGivenInternal();
void Nrt_SetErrMsgCompilationErrorInternal();
void Nrt_SetErrMsgIsFileNotFoundInternal();
void Nrt_SetErrMsgIsDivideByZeroInternal();
void Nrt_SetErrMsgIsAlreadyDeletedOrRemovedInternal();
void Nrt_SetErrMsgIsNotSupportedInternal();
void Nrt_SetErrMsgIsInitialisationFailureInternal();
void Nrt_SetErrMsgIsFunctionNotFoundInternal();
void Nrt_SetErrMsgIsNotInitialisedInternal();
void Nrt_SetErrMsgIsArgumentOutOfRangeInternal();
void Nrt_SetErrMsgIsInvalidOperationInternal();
void Nrt_SetErrMsgIsCharacterNotFoundInternal();
void Nrt_SetErrMsgIsOutOfMemoryInternal();
void Nrt_SetErrMsgKeyNotFoundInternal();
void Nrt_SetErrMsgRuntimeNotFoundInternal();
void Nrt_SetErrMsgErrorUnknownInternal();
void Nrt_SetErrMsgIsInvalidPathInternal();
void Nrt_SetErrMsgCustomInternal(const char* message);

#ifdef __cplusplus
}
Expand Down
60 changes: 30 additions & 30 deletions src/NovelRT.Interop/Audio/NrtAudioService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -40,7 +40,7 @@ extern "C"
}
catch (const Exceptions::InitialisationFailureException&)
{
Nrt_setErrMsgIsInitialisationFailureInternal();
Nrt_SetErrMsgIsInitialisationFailureInternal();
return NRT_FAILURE_INITIALISATION_FAILURE;
}
}
Expand All @@ -53,7 +53,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -66,7 +66,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -78,7 +78,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -90,7 +90,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -104,7 +104,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -116,7 +116,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -127,7 +127,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -139,7 +139,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -152,7 +152,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -164,7 +164,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -175,7 +175,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -187,7 +187,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -198,7 +198,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -210,7 +210,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -221,7 +221,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -233,7 +233,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -244,7 +244,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -262,7 +262,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -275,7 +275,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -286,7 +286,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -299,7 +299,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -311,7 +311,7 @@ extern "C"
}
catch (const Exceptions::NotInitialisedException&)
{
Nrt_setErrMsgIsNotInitialisedInternal();
Nrt_SetErrMsgIsNotInitialisedInternal();
return NRT_FAILURE_NOT_INITIALISED;
}

Expand All @@ -322,7 +322,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -335,7 +335,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -348,7 +348,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -361,7 +361,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -374,7 +374,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -387,7 +387,7 @@ extern "C"
{
if (service == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand Down
12 changes: 6 additions & 6 deletions src/NovelRT.Interop/Ecs/Audio/NrtAudioSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern "C"
{
if (system == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -36,7 +36,7 @@ extern "C"
{
if (system == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -54,7 +54,7 @@ extern "C"

if (context == nullptr || catalogue == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -72,7 +72,7 @@ extern "C"
{
if (system == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -88,7 +88,7 @@ extern "C"
{
if (system == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand All @@ -106,7 +106,7 @@ extern "C"
{
if (system == nullptr)
{
Nrt_setErrMsgIsNullInstanceProvidedInternal();
Nrt_SetErrMsgIsNullInstanceProvidedInternal();
return NRT_FAILURE_NULL_INSTANCE_PROVIDED;
}

Expand Down
Loading

0 comments on commit cfb08f0

Please sign in to comment.