@@ -240,51 +240,51 @@ func completeCmdArg*(T: type TrustedDigest, input: string): seq[string] =
240240 return @ []
241241
242242proc parseCmdArg * (T: type enr.Record , p: string ): T
243- {.raises : [ConfigurationError ].} =
243+ {.raises : [ValueError ].} =
244244 if not fromURI (result , p):
245- raise newException (ConfigurationError , " Invalid ENR" )
245+ raise newException (ValueError , " Invalid ENR" )
246246
247247proc completeCmdArg * (T: type enr.Record , val: string ): seq [string ] =
248248 return @ []
249249
250250proc parseCmdArg * (T: type Node , p: string ): T
251- {.raises : [ConfigurationError ].} =
251+ {.raises : [ValueError ].} =
252252 var record: enr.Record
253253 if not fromURI (record, p):
254- raise newException (ConfigurationError , " Invalid ENR" )
254+ raise newException (ValueError , " Invalid ENR" )
255255
256256 let n = newNode (record)
257257 if n.isErr:
258- raise newException (ConfigurationError , $ n.error)
258+ raise newException (ValueError , $ n.error)
259259
260260 if n[].address.isNone ():
261- raise newException (ConfigurationError , " ENR without address" )
261+ raise newException (ValueError , " ENR without address" )
262262
263263 n[]
264264
265265proc completeCmdArg * (T: type Node , val: string ): seq [string ] =
266266 return @ []
267267
268268proc parseCmdArg * (T: type PrivateKey , p: string ): T
269- {.raises : [ConfigurationError ].} =
269+ {.raises : [ValueError ].} =
270270 try :
271271 result = PrivateKey .fromHex (p).tryGet ()
272272 except CatchableError :
273- raise newException (ConfigurationError , " Invalid private key" )
273+ raise newException (ValueError , " Invalid private key" )
274274
275275proc completeCmdArg * (T: type PrivateKey , val: string ): seq [string ] =
276276 return @ []
277277
278278proc parseCmdArg * (T: type ClientConfig , p: string ): T
279- {.raises : [ConfigurationError ].} =
279+ {.raises : [ValueError ].} =
280280 let uri = parseUri (p)
281281 if (uri.scheme == " http" or uri.scheme == " https" ):
282282 getHttpClientConfig (p)
283283 elif (uri.scheme == " ws" or uri.scheme == " wss" ):
284284 getWebSocketClientConfig (p)
285285 else :
286286 raise newException (
287- ConfigurationError , " Proxy uri should have defined scheme (http/https/ws/wss)"
287+ ValueError , " Proxy uri should have defined scheme (http/https/ws/wss)"
288288 )
289289
290290proc completeCmdArg * (T: type ClientConfig , val: string ): seq [string ] =
0 commit comments