Allow inclusion of Exceptions in warn convenience templates.
This commit is contained in:
1 parent
f0f0084cfd
commit
7e1671b26e
2 files changed
+4
-1
No files matched your search
@@ -548,6 +548,9 @@ template notice*[L: Logger or Option[Logger], M](l: L, msg: M) =
|
||||
template warn*[L: Logger or Option[Logger], M](l: L, msg: M) =
|
||||
log(l, lvlWarn, msg)
|
||||
|
||||
template warn*[L: Logger or Option[Logger], M](l: L, err: ref Exception, msg: M) =
|
||||
log(l, lvlWarn, err, msg)
|
||||
|
||||
template error*[L: Logger or Option[Logger], M](l: L, msg: M) =
|
||||
log(l, lvlError, msg)
|
||||
|
||||
|
||||
Reference in new issue
Block a user