rework the exception hierarchy; refs #8363
This commit is contained in:
parent
28c709fa84
commit
1d78ba64b4
5 changed files with 45 additions and 106 deletions
|
|
@ -119,8 +119,7 @@ proc newSmtp*(useSsl = false, debug=false,
|
|||
when compiledWithSsl:
|
||||
sslContext.wrapSocket(result.sock)
|
||||
else:
|
||||
raise newException(SystemError,
|
||||
"SMTP module compiled without SSL support")
|
||||
{.error: "SMTP module compiled without SSL support".}
|
||||
|
||||
proc newAsyncSmtp*(useSsl = false, debug=false,
|
||||
sslContext = defaultSslContext): AsyncSmtp =
|
||||
|
|
@ -133,8 +132,7 @@ proc newAsyncSmtp*(useSsl = false, debug=false,
|
|||
when compiledWithSsl:
|
||||
sslContext.wrapSocket(result.sock)
|
||||
else:
|
||||
raise newException(SystemError,
|
||||
"SMTP module compiled without SSL support")
|
||||
{.error: "SMTP module compiled without SSL support".}
|
||||
|
||||
proc quitExcpt(smtp: AsyncSmtp, msg: string): Future[void] =
|
||||
var retFuture = newFuture[void]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue