Changed Windows sysData.setText() to panic on error. WM_SETTEXT's documentation indicates the main error is memory exhausted, which means we should panic anyway (unless the Go runtime already has). Any other error will be flagged as unexpected; since we're using SetWindowText() we can't differentiate between out of memory and other errors in the way WM_SETTEXT documents anyway.
This commit is contained in:
parent
51fea6be87
commit
65663c0533
|
@ -254,7 +254,7 @@ func (s *sysData) setText(text string) error {
|
||||||
}
|
}
|
||||||
r := <-ret
|
r := <-ret
|
||||||
if r.ret == 0 { // failure
|
if r.ret == 0 { // failure
|
||||||
return r.err
|
panic(fmt.Errorf("error setting window/control text: %v", err))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue