Exemple #1
0
func checkError() error {
	c := C.libvlc_errmsg()
	if c != nil {
		return errors.New(C.GoString(c))
	}
	return nil
}
Exemple #2
0
// checkError checks if there is a new error message available. If so, return
// it as an os.Error. For internal use only.
func checkError() (err error) {
	if c := C.libvlc_errmsg(); c != nil {
		err = errors.New(C.GoString(c))
		C.free(unsafe.Pointer(c))
	}
	return
}
Exemple #3
0
func getError() error {
	msg := C.libvlc_errmsg()
	if msg != nil {
		return errors.New(C.GoString(msg))
	}

	return nil
}
Exemple #4
0
func LastError() error {
	str := C.libvlc_errmsg()
	if str == nil {
		return nil
	}

	defer C.free(unsafe.Pointer(str))
	defer C.libvlc_clearerr()

	return errors.New(C.GoString(str))
}