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:
Pietro Gagliardi 2014-03-10 10:32:45 -04:00
parent 51fea6be87
commit 65663c0533
1 changed files with 1 additions and 1 deletions

View File

@ -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
} }