remove unused `LPStreamError` types (#1048)
This commit is contained in:
parent
44cada9c55
commit
42cd78e95b
|
@ -50,12 +50,7 @@ type
|
|||
|
||||
LPStreamError* = object of LPError
|
||||
LPStreamIncompleteError* = object of LPStreamError
|
||||
LPStreamIncorrectDefect* = object of Defect
|
||||
LPStreamLimitError* = object of LPStreamError
|
||||
LPStreamReadError* = object of LPStreamError
|
||||
par*: ref CatchableError
|
||||
LPStreamWriteError* = object of LPStreamError
|
||||
par*: ref CatchableError
|
||||
LPStreamEOFError* = object of LPStreamError
|
||||
|
||||
# X | Read | Write
|
||||
|
@ -77,30 +72,12 @@ type
|
|||
opened*: uint64
|
||||
closed*: uint64
|
||||
|
||||
proc newLPStreamReadError*(p: ref CatchableError): ref LPStreamReadError =
|
||||
var w = newException(LPStreamReadError, "Read stream failed")
|
||||
w.msg = w.msg & ", originated from [" & $p.name & "] " & p.msg
|
||||
w.par = p
|
||||
result = w
|
||||
|
||||
proc newLPStreamReadError*(msg: string): ref LPStreamReadError =
|
||||
newException(LPStreamReadError, msg)
|
||||
|
||||
proc newLPStreamWriteError*(p: ref CatchableError): ref LPStreamWriteError =
|
||||
var w = newException(LPStreamWriteError, "Write stream failed")
|
||||
w.msg = w.msg & ", originated from [" & $p.name & "] " & p.msg
|
||||
w.par = p
|
||||
result = w
|
||||
|
||||
proc newLPStreamIncompleteError*(): ref LPStreamIncompleteError =
|
||||
result = newException(LPStreamIncompleteError, "Incomplete data received")
|
||||
|
||||
proc newLPStreamLimitError*(): ref LPStreamLimitError =
|
||||
result = newException(LPStreamLimitError, "Buffer limit reached")
|
||||
|
||||
proc newLPStreamIncorrectDefect*(m: string): ref LPStreamIncorrectDefect =
|
||||
result = newException(LPStreamIncorrectDefect, m)
|
||||
|
||||
proc newLPStreamEOFError*(): ref LPStreamEOFError =
|
||||
result = newException(LPStreamEOFError, "Stream EOF!")
|
||||
|
||||
|
|
Loading…
Reference in New Issue