Skip to content

Migrate value-returning error sites to metacall_error_throw#814

Open
ROKUMATE wants to merge 4 commits into
metacall:developfrom
ROKUMATE:feat-metacall-error-throw-migration
Open

Migrate value-returning error sites to metacall_error_throw#814
ROKUMATE wants to merge 4 commits into
metacall:developfrom
ROKUMATE:feat-metacall-error-throw-migration

Conversation

@ROKUMATE

Copy link
Copy Markdown
Contributor

Summary

Replaces log_write + return NULL with metacall_error_throw across
value-returning entrypoints in metacall.c and the loaders, so errors
propagate as throwable values instead of being silently swallowed.

Pattern follows rapid_json_serial_impl.cpp:422:

  return metacall_error_throw("metacall", -1, NULL, "<message>", <args>);

Scope

In:

  • value-returning functions (return type void * / value)
  • removes the old log + NULL return; single throw statement

Out:

  • int-returning functions
  • metacall_error_last / metacall_error_clear (still TODO)
  • stacktrace propagation
  • debug-mode log inside metacall_error_throw

Progress

  • handle-validation entrypoints (metacallhv, metacallhv_s, metacallht_s, metacall_handle_function, metacall_handle_export)
  • "method not implemented" cluster (metacallv_method and friends)
  • remaining value-returning sites in metacall.c
  • per-loader passes (py_loader, node_loader, ...)

@ROKUMATE ROKUMATE marked this pull request as ready for review June 11, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant