diff options
author | Charles Blake <cblake@csail.mit.edu> | 2015-02-12 05:18:10 -0500 |
---|---|---|
committer | Charles Blake <cblake@csail.mit.edu> | 2015-02-12 05:18:10 -0500 |
commit | 2cc5bc0db34b2debe3377b147f776e8ea39f1045 (patch) | |
tree | ef149d40d24b3ea0138575909cb1f72f7bc9d793 /lib | |
parent | 92607dc4742a0cb95a58cde87bf6edb82e489bfd (diff) | |
parent | 4f00ae5a5afd0702a286a31f6bbdbdd8745be8c5 (diff) | |
download | Nim-2cc5bc0db34b2debe3377b147f776e8ea39f1045.tar.gz |
Merge ../Nim into devel
Diffstat (limited to 'lib')
-rw-r--r-- | lib/impure/db_mysql.nim | 4 | ||||
-rw-r--r-- | lib/system/excpt.nim | 14 | ||||
-rw-r--r-- | lib/wrappers/mysql.nim | 2 |
3 files changed, 17 insertions, 3 deletions
diff --git a/lib/impure/db_mysql.nim b/lib/impure/db_mysql.nim index 968a2923a..dab84c2d5 100644 --- a/lib/impure/db_mysql.nim +++ b/lib/impure/db_mysql.nim @@ -16,11 +16,11 @@ type TDbConn* = PMySQL ## encapsulates a database connection TRow* = seq[string] ## a row of a dataset. NULL database values will be ## transformed always to the empty string. - EDb* = object of EIO ## exception that is raised if a database error occurs + EDb* = object of IOError ## exception that is raised if a database error occurs TSqlQuery* = distinct string ## an SQL query string - FDb* = object of FIO ## effect that denotes a database operation + FDb* = object of IOEffect ## effect that denotes a database operation FReadDb* = object of FDb ## effect that denotes a read operation FWriteDb* = object of FDb ## effect that denotes a write operation diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index 417a8634f..1b3471978 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -175,6 +175,8 @@ proc auxWriteStackTrace(f: PFrame, s: var string) = add(s, tempFrames[j].procname) add(s, "\n") +proc stackTraceAvailable*(): bool + when hasSomeStackTrace: proc rawWriteStackTrace(s: var string) = when NimStackTrace: @@ -188,6 +190,18 @@ when hasSomeStackTrace: auxWriteStackTraceWithBacktrace(s) else: add(s, "No stack traceback available\n") + proc stackTraceAvailable(): bool = + when NimStackTrace: + if framePtr == nil: + result = false + else: + result = true + elif defined(nativeStackTrace) and nativeStackTraceSupported: + result = true + else: + result = false +else: + proc stackTraceAvailable*(): bool = result = false proc quitOrDebug() {.inline.} = when not defined(endb): diff --git a/lib/wrappers/mysql.nim b/lib/wrappers/mysql.nim index 9161f5672..3857744ae 100644 --- a/lib/wrappers/mysql.nim +++ b/lib/wrappers/mysql.nim @@ -13,7 +13,7 @@ when defined(Unix): when defined(macosx): const - lib = "libmysqlclient.(15|16|17[18).dylib" + lib = "libmysqlclient.(15|16|17|18).dylib" else: const lib = "libmysqlclient.so.(15|16|17|18)" |