summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/impure/zipfiles.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/impure/zipfiles.nim b/lib/impure/zipfiles.nim
index 63b8a843d..b9f89dda0 100644
--- a/lib/impure/zipfiles.nim
+++ b/lib/impure/zipfiles.nim
@@ -57,10 +57,7 @@ proc addFile*(z: var TZipArchive, dest, src: string) =
   ## may contain a path that will be created. 
   assert(z.mode != fmRead) 
   if not fileExists(src):
-    var e: ref EIO
-    new(e)
-    e.msg = "File does not exist"
-    raise e   
+    raise newException(EIO, "File '" & src & "' does not exist")
   var zipsrc = zip_source_file(z.w, src, 0, -1)
   if zipsrc == nil:
     #echo("Dest: " & dest)