Change all `log_write` by `metacall_throw_error`
Maintainers usually reply within 1 day
@Sukuna0007Abhi is already working on this.
Since Mar 24, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the repeated log_write and metacall_error_throw pattern shown in the issue, along with the linked pull-request discussion. Search the core codebase for log_write calls involving value errors and determine which should use metacall_error_throw; done means the relevant cases avoid duplicated logging while preserving the proposed debug-build behavior.
Written by the indexing model from the issue text.
Description
We should start to use this type of error in the cases that values are involved.
if (i < (int64_t)LONG_MIN || i > (int64_t)LONG_MAX)
{
log_write("metacall", LOG_LEVEL_ERROR, "64-bit signed integer value overflows long in RapidJSON implementation");
return (value)metacall_error_throw("RapidJSON", -1, NULL, "64-bit signed integer value overflows long in RapidJSON implementation");
}
But I have also noticed that the log pattern is getting repeated. Another step towards this would be to put the log_write inside the metacall_error_throw only for when compiling in debug.
https://github.com/metacall/core/pull/667#discussion_r2981781391
- Dominant language
- C
- Stars
- 1.8k
- Forks
- 266
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 14
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from metacall/core
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
metacall/core#964 · 1 comment ·
Maintainers usually reply within 1 day
-
pre-push hook empties VERSION when the clone has no tagsPossibly taken @vedant21-oss claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
metacall/core#939 · 3 comments ·
Maintainers usually reply within 1 day
-
TOCTOU race condition vulnerability!Possibly taken @akshatchitransh claimed this 1 day ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
metacall/core#961 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 Half a day Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Go Port Race Conditions on MacOSPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
metacall/core#942 · 3 comments ·
Maintainers usually reply within 1 day
Similar issues
-
`table_create()` crashes when an `hccalloc()` for the option table failsPossibly taken @marinelay claimed this today. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AlessandroSangiuliano/Uros#950 ·
-
ESP32
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
HandBrake/HandBrake#8266 · 1 comment ·
Maintainers usually reply within 1 day