Exemplo n.º 1
0
// Returns the severity, reason, and description of any error that occurs
// when using other methods in this API.
func (p *PixelWand) Exception() (string, int) {
	var severity C.ExceptionType
	errPtr := C.PixelGetException(p.wand, &severity)
	C.PixelClearException(p.wand)
	err := C.GoString(errPtr)
	C.MagickRelinquishMemory(unsafe.Pointer(errPtr))
	return err, int(severity)
}
Exemplo n.º 2
0
// Clears any exceptions associated with the wand
func (pw *PixelWand) clearException() bool {
	return 1 == C.int(C.PixelClearException(pw.pw))
}