/* Fill in a DatabaseError with information about the last error from MySQL. */ func (self *Connection) error() (error os.Error) { e := new(DatabaseError) e.basic = int(C.wm_errno(self.handle)) // mysql is not extended error code e.extended = 0 e.message = string(C.GoString(C.wm_error(self.handle))) return e }
func LastError(mysql C.wmysql) os.Error { if err := C.wm_error(mysql); *err != 0 { return os.NewError(C.GoString(err)) } return nil }