Files
gocv/cuda/errors.go
2025-03-18 11:04:10 -03:00

16 lines
253 B
Go

package cuda
/*
#include "../core.h"
*/
import "C"
import "errors"
// Converts a OpenCVResult struct to an error.
func OpenCVResult(result C.OpenCVResult) error {
if result.Code == 0 {
return nil
}
return errors.New(C.GoString(result.Message))
}