pegs: get rid of spurious exception effects (#25399)

Pegs raise only their own error, but the forward declaration causes an
unwanted Exception effect

* use strformat which does compile-time analysis of the format string to
avoid exceptions
* also in parsecfg
This commit is contained in:
Jacek Sieka
2026-01-01 01:33:35 +01:00
committed by GitHub
parent ae8a1739f8
commit 92ad98f5d8
3 changed files with 25 additions and 26 deletions

View File

@@ -41,7 +41,7 @@ proc normalizePathAux(path: var string){.inline, raises: [], noSideEffect.}
import std/private/osseps
export osseps
proc absolutePathInternal(path: string): string {.gcsafe.}
proc absolutePathInternal(path: string): string {.gcsafe, raises: [ValueError, OSerror].}
proc normalizePathEnd*(path: var string, trailingSep = false) =
## Ensures ``path`` has exactly 0 or 1 trailing `DirSep`, depending on