Skip to content

Commit becf8ca

Browse files
committed
refactor(ScriptHook): replace panics with error handling
- Replace all std.debug.panic() calls with proper error returns - Add Error type with specific variants: GetModuleFileNameFailed, UnsupportedGame, DllLoadFailed, FunctionResolutionFailed, OutOfMemory - Add GameVersionError for game type validation (NotGTAV, NotRDR2) - Use std.once for thread-safe one-time initialization - Update invoker.zig to propagate errors from ScriptHook functions BREAKING CHANGE: All public functions now return errors instead of panicking. Callers must use `try` or handle errors explicitly.
1 parent cac4cb0 commit becf8ca

2 files changed

Lines changed: 189 additions & 115 deletions

File tree

0 commit comments

Comments
 (0)