From bca0ecb8c75a2bbf46d8eb216d07c78dc67b2cf6 Mon Sep 17 00:00:00 2001 From: Andy Davidoff Date: Fri, 28 Aug 2020 11:50:59 -0400 Subject: [PATCH] 0.1.1: use FreezeError --- frosty.nim | 4 ++-- frosty.nimble | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frosty.nim b/frosty.nim index b513b64..e0905f9 100644 --- a/frosty.nim +++ b/frosty.nim @@ -17,7 +17,7 @@ const type FreezeError* = ValueError ## - ## An error raised during `freeze`. (unused) + ## An error raised during `freeze`. ThawError* = ValueError ## ## An error raised during `thaw`. @@ -178,7 +178,7 @@ proc write[S, T](s: var Serializer[S]; o: ref T; parent = 0) = if g.p != parent: s.write o[], parent = g.p else: - raise + raise newException(FreezeError, "unexpected cycle") proc readTuple[S, T](s: var Serializer[S]; o: var T; skip = false) = var skip = skip diff --git a/frosty.nimble b/frosty.nimble index 5152631..22fdcc7 100644 --- a/frosty.nimble +++ b/frosty.nimble @@ -1,4 +1,4 @@ -version = "0.1.0" +version = "0.1.1" author = "disruptek" description = "serialize native Nim objects via streams, sockets" license = "MIT"