Skip to content

checks: exclude nil function name from error messages - #70

Open
patapenka-alexey wants to merge 1 commit into
masterfrom
patapenka-alexey/gh-61-exclude-nil-name
Open

patapenka-alexey wants to merge 1 commit into
masterfrom
patapenka-alexey/gh-61-exclude-nil-name

Conversation

@patapenka-alexey

Copy link
Copy Markdown
Contributor

When a checked function has no statically-resolved name (for example, it is called from C via pcall, or through the callable module table), debug.getinfo() reports a nil name, which was formatted into the message as "to nil".

Format the " to " part separately and omit it when the name is unknown.

Closes #61

When a checked function has no statically-resolved name (for example,
it is called from C via pcall, or through the callable module table),
debug.getinfo() reports a nil name, which was formatted into the
message as "to nil".

Format the " to <name>" part separately and omit it when the name is
unknown.

Closes #61
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.

Exclude nil function name from error

1 participant