Skip to content

Docs: map UNU.RAN error codes to human-readable descriptions #82

@wrdxwrdxwrdx

Description

@wrdxwrdxwrdx

Summary

utils.get_unuran_error_message already surfaces the raw UNU.RAN errno and the C string from
unur_get_strerror, but there is no Python-side reference explaining what each numeric code
means, when it is raised, and what the caller should do about it. Encountering
(errno: 23): ... in a RuntimeError gives a developer no actionable information without
reading the UNU.RAN C source.

What the documentation should provide

  • A table mapping each UNU.RAN error code integer to its symbolic constant name
    (e.g. UNUR_ERR_DISTR_DOMAIN) and a short plain-English description.
  • Notes on which codes can appear from the methods currently wired in
    (PINV, HINV, NINV, AROU, TDR, DGT) and their likely causes in Python terms.

Source

Error codes and their symbolic names are defined in the UNU.RAN header
unuran_errno.h inside the vendored submodule.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions