summary refs log tree commit diff stats
path: root/tests/exception
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exception')
-rw-r--r--tests/exception/texcas.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/exception/texcas.nim b/tests/exception/texcas.nim
index ac6e5db62..807f2c802 100644
--- a/tests/exception/texcas.nim
+++ b/tests/exception/texcas.nim
@@ -1,10 +1,10 @@
 discard """
   output: '''Hello'''
 """
+proc test[T]() =
+  try:
+    raise newException(T, "Hello")
+  except T as foobar:
+    echo(foobar.msg)
 
-try:
-  raise newException(Exception, "Hello")
-except Exception as foobar:
-  echo(foobar.msg)
-
-
+test[Exception]()