cerror

package module
v0.0.0-...-1b8ff36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2021 License: MIT Imports: 2 Imported by: 0

README

cerror

cerror is a go pacakge for easily handling C++ exceptions in Go when linking C++ libraries to your Go applications.

Documentation

Index

Constants

View Source
const BOOL_TYPE = int(C.BOOL_TYPE)
View Source
const DOUBLE_TYPE = int(C.DOUBLE_TYPE)
View Source
const INT_TYPE = int(C.INT_TYPE)
View Source
const STRING_TYPE = int(C.STRING_TYPE)

Variables

This section is empty.

Functions

This section is empty.

Types

type CError

type CError interface {
	error
	Free()
	GetFuncReturnType() int
	GetFuncReturnValue() interface{}
	GetFuncReturnPtrValue(funcReturnType int) unsafe.Pointer
}

type CErrorImpl

type CErrorImpl struct {
	Ptr unsafe.Pointer
}

func (CErrorImpl) Error

func (ce CErrorImpl) Error() string

Error returns the error message

func (CErrorImpl) Free

func (ce CErrorImpl) Free()

Free frees the memory allocated to ce.Ptr. This method will soon be removed once smart pointers are used within C++ Error library

func (CErrorImpl) GetErrorMessage

func (ce CErrorImpl) GetErrorMessage() *string

GetErrorMessage returns a pointer to the error message

func (CErrorImpl) GetFuncReturnStructValue

func (ce CErrorImpl) GetFuncReturnStructValue(CStructTypeId int) unsafe.Pointer

func (CErrorImpl) GetFuncReturnType

func (ce CErrorImpl) GetFuncReturnType() int

GetFuncReturnType returns the type id of the ce's delegated function

func (CErrorImpl) GetFuncReturnValue

func (ce CErrorImpl) GetFuncReturnValue() interface{}

GetFuncReturnValue returns the value of the ce's delegated function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL