diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-10 10:32:45 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-10 10:32:45 -0400 |
| commit | 65663c05331f93b1fa94533ef206a0aaa2827896 (patch) | |
| tree | 5d3d318ae1c6a47e7fa8c8e76ca5831d37380bc2 /sysdata_windows.go | |
| parent | 51fea6be87ed0a3f2dc1be396cea250f234a59b9 (diff) | |
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.
Diffstat (limited to 'sysdata_windows.go')
| -rw-r--r-- | sysdata_windows.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index a0935c9..798076b 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -254,7 +254,7 @@ func (s *sysData) setText(text string) error { } r := <-ret if r.ret == 0 { // failure - return r.err + panic(fmt.Errorf("error setting window/control text: %v", err)) } return nil } |
