MCPcopy Create free account
hub / github.com/cogentcore/core / NewError

Function NewError

vgpu/errors.go:22–32  ·  view source on GitHub ↗
(ret vk.Result)

Source from the content-addressed store, hash-verified

20}
21
22func NewError(ret vk.Result) error {
23 if ret != vk.Success {
24 err := fmt.Errorf("vulkan error: %s (%d)", vk.Error(ret).Error(), ret)
25 if Debug {
26 log.Println(err)
27 debug.PrintStack()
28 }
29 return err
30 }
31 return nil
32}
33
34func IfPanic(err error, finalizers ...func()) {
35 if err != nil {

Callers 15

ConfigMethod · 0.85
InstanceExtsFunction · 0.85
DeviceExtsFunction · 0.85
ValidationLayersFunction · 0.85
DescLayoutMethod · 0.85
MakeDeviceMethod · 0.85
ConfigTransientMethod · 0.85
ConfigResettableMethod · 0.85
NewBufferMethod · 0.85
CmdBeginFunction · 0.85
CmdBeginOneTimeFunction · 0.85
CmdSubmitFunction · 0.85

Calls 3

PrintlnMethod · 0.80
ErrorfMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected