NovelRT
NovelRT copied to clipboard
C API error message rework.
As the title suggests, we should be reworking the old error handling system to use the new system as outlined in #260 to create a smoother translation experience from error code to message. This should also mean that all functions need to do is return their relevant error codes which can be translated, as opposed to explicitly setting the error messages like we do now.
If I get it right, to kick off this we should start with adding a currentErrorCode
and replace the changes of currentErrorMessage
with error codes. Or maybe even create Nrt_SetErrCodeIsFileNotFoundInternal
sort of functions to use in place of the existing ones?
I'd be glad to discuss it further.
In general we would be reworking the old API so that we aren't storing previous errors - simply returning the relevant NrtResult
object, which we then shove into our (nonexistent) translation APIs.