summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2019-02-25 16:18:17 +0100
committerAlexander Neumann <alexander.neumann@picos-software.com>2019-02-25 16:18:17 +0100
commitbae2fc0d05e2ad00e106bf88b4fbdea567988ded (patch)
treea383355ac2cb74dbe1db794350951854af0abec3
parentboolProperty: Accept source of type Expression (diff)
downloadwireguard-windows-bae2fc0d05e2ad00e106bf88b4fbdea567988ded.tar.xz
wireguard-windows-bae2fc0d05e2ad00e106bf88b4fbdea567988ded.zip
Replace newErr with newError
-rw-r--r--brush.go6
-rw-r--r--canvas.go2
-rw-r--r--dateedit.go2
-rw-r--r--graphicseffects.go2
-rw-r--r--linklabel.go4
-rw-r--r--resourcemanager.go2
6 files changed, 9 insertions, 9 deletions
diff --git a/brush.go b/brush.go
index 478b7d2e..617c4978 100644
--- a/brush.go
+++ b/brush.go
@@ -312,11 +312,11 @@ type GradientBrush struct {
func NewGradientBrush(vertexes []GradientVertex, triangles []GradientTriangle) (*GradientBrush, error) {
if len(vertexes) < 3 {
- return nil, newErr("at least 3 vertexes are required")
+ return nil, newError("at least 3 vertexes are required")
}
if len(triangles) < 1 {
- return nil, newErr("at least 1 triangle is required")
+ return nil, newError("at least 1 triangle is required")
}
var size Size
@@ -395,7 +395,7 @@ func (b *GradientBrush) create(size Size) (*BitmapBrush, error) {
}
if !win.GradientFill(canvas.hdc, &vertexes[0], uint32(len(vertexes)), unsafe.Pointer(&triangles[0]), uint32(len(triangles)), win.GRADIENT_FILL_TRIANGLE) {
- return nil, newErr("GradientFill failed")
+ return nil, newError("GradientFill failed")
}
disposables.Spare()
diff --git a/canvas.go b/canvas.go
index 7118c1cb..872bec7e 100644
--- a/canvas.go
+++ b/canvas.go
@@ -372,7 +372,7 @@ func (c *Canvas) GradientFillRectangle(color1, color2 Color, orientation Orienta
}
if !win.GradientFill(c.hdc, &vertices[0], 2, unsafe.Pointer(&indices), 1, uint32(orientation)) {
- return newErr("GradientFill failed")
+ return newError("GradientFill failed")
}
return nil
diff --git a/dateedit.go b/dateedit.go
index 87cd8d0e..0440915b 100644
--- a/dateedit.go
+++ b/dateedit.go
@@ -160,7 +160,7 @@ func (de *DateEdit) SetFormat(format string) error {
lp := uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(format)))
if 0 == de.SendMessage(win.DTM_SETFORMAT, 0, lp) {
- return newErr("DTM_SETFORMAT failed")
+ return newError("DTM_SETFORMAT failed")
}
de.format = format
diff --git a/graphicseffects.go b/graphicseffects.go
index 73c921a8..5527e4db 100644
--- a/graphicseffects.go
+++ b/graphicseffects.go
@@ -168,7 +168,7 @@ func newWidgetGraphicsEffectList(observer widgetGraphicsEffectListObserver) *Wid
func (l *WidgetGraphicsEffectList) Add(effect WidgetGraphicsEffect) error {
if effect == nil {
- return newErr("effect == nil")
+ return newError("effect == nil")
}
return l.Insert(len(l.items), effect)
diff --git a/linklabel.go b/linklabel.go
index 4c69fee4..d959e092 100644
--- a/linklabel.go
+++ b/linklabel.go
@@ -196,7 +196,7 @@ func (lll *LinkLabelLink) hasState(state uint32) (bool, error) {
}
if win.TRUE != lll.ll.SendMessage(win.LM_GETITEM, 0, uintptr(unsafe.Pointer(&li))) {
- return false, newErr("LM_GETITEM")
+ return false, newError("LM_GETITEM")
}
return li.State&state == state, nil
@@ -216,7 +216,7 @@ func (lll *LinkLabelLink) setState(state uint32, set bool) error {
li.ILink = int32(lll.index)
if win.TRUE != lll.ll.SendMessage(win.LM_SETITEM, 0, uintptr(unsafe.Pointer(&li))) {
- return newErr("LM_SETITEM")
+ return newError("LM_SETITEM")
}
return nil
diff --git a/resourcemanager.go b/resourcemanager.go
index 95a00645..9e4741ca 100644
--- a/resourcemanager.go
+++ b/resourcemanager.go
@@ -116,5 +116,5 @@ func (rm *ResourceManager) Image(name string) (Image, error) {
func (rm *ResourceManager) notFoundErr(typ, name string) error {
path := filepath.Clean(filepath.Join(rm.rootDirPath, name))
- return newErr(fmt.Sprintf("neither %s resource '%s' nor file '%s' could be found or the image format is not supported", typ, name, path))
+ return newError(fmt.Sprintf("neither %s resource '%s' nor file '%s' could be found or the image format is not supported", typ, name, path))
}