Skip to content

Commit

Permalink
Merge pull request #9 from Menduist/checkedexceptions
Browse files Browse the repository at this point in the history
Checked exceptions
  • Loading branch information
ba0f3 authored Jan 4, 2022
2 parents 536cc6b + 4389ebf commit 1940dee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/dnsclientpkg/records/soa.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type SOARecord* = ref object of ResourceRecord
expire*: int32
minimum*: uint32

method toString*(r: SOARecord): string = "$# $# $# $# $# $# $#" % [r.mname, r.rname, $r.serial, $r.refresh, $r.retry, $r.expire, $r.minimum]
method toString*(r: SOARecord): string = [r.mname, r.rname, $r.serial, $r.refresh, $r.retry, $r.expire, $r.minimum].join(" ")

method parse*(r: SOARecord, data: StringStream) =
r.mname = data.getName()
Expand Down
6 changes: 3 additions & 3 deletions src/dnsclientpkg/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ type



method parse*(r: ResourceRecord, data: StringStream) {.base.} =
method parse*(r: ResourceRecord, data: StringStream) {.base, raises: [Defect, OSError, IOError].} =
raise newException(LibraryError, "parser for " & $r.kind & " is not implemented yet")

method toString*(r: ResourceRecord): string {.base.} =
raise newException(LibraryError, "to override!")
method toString*(r: ResourceRecord): string {.base, raises: [Defect, OSError, IOError].} =
raise newException(LibraryError, "to override!")

0 comments on commit 1940dee

Please sign in to comment.