NovelRT icon indicating copy to clipboard operation
NovelRT copied to clipboard

C API error message rework.

Open RubyNova opened this issue 4 years ago • 2 comments

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.

RubyNova avatar Feb 12 '21 22:02 RubyNova

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.

bjauny avatar Oct 24 '23 20:10 bjauny

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.

RubyNova avatar Oct 26 '23 01:10 RubyNova