A have a structure like this (defined in bson.h of mongodb c driver):
typedef struct { uint32_t domain; uint32_t code; char message[504]; } bson_error_
Here my suggestion (similar to rintaro's approach, perhaps slightly simpler):
var err: UnsafeMutablePointer = ... var msg = err.memory.message let msgString = withUnsafePointer(&msg) { String.fromCString(UnsafePointer($0)) } println(msgString)