mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-30 12:17:56 +00:00
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
(cherry picked from commit 92ad98f5d8)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user