Skip to content

Commit 59819ff

Browse files
jonas-schulzesbinet
authored andcommitted
plotutil: Add package name to error messages
1 parent 5ca4c5f commit 59819ff

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

plotutil/add.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func AddStackedAreaPlots(plt *plot.Plot, xs plotter.Valuer, vs ...interface{}) e
7171
}
7272

7373
default:
74-
panic(fmt.Sprintf("AddStackedAreaPlots handles strings and plotter.Valuers, got %T", t))
74+
panic(fmt.Sprintf("plotutil: AddStackedAreaPlots handles strings and plotter.Valuers, got %T", t))
7575
}
7676
}
7777

@@ -114,7 +114,7 @@ func AddBoxPlots(plt *plot.Plot, width vg.Length, vs ...interface{}) error {
114114
name = ""
115115

116116
default:
117-
panic(fmt.Sprintf("AddBoxPlots handles strings and plotter.Valuers, got %T", t))
117+
panic(fmt.Sprintf("plotutil: AddBoxPlots handles strings and plotter.Valuers, got %T", t))
118118
}
119119
}
120120
plt.Add(ps...)
@@ -158,7 +158,7 @@ func AddScatters(plt *plot.Plot, vs ...interface{}) error {
158158
}
159159

160160
default:
161-
panic(fmt.Sprintf("AddScatters handles strings and plotter.XYers, got %T", t))
161+
panic(fmt.Sprintf("plotutil: AddScatters handles strings and plotter.XYers, got %T", t))
162162
}
163163
}
164164
plt.Add(ps...)
@@ -215,7 +215,7 @@ func AddLines(plt *plot.Plot, vs ...interface{}) error {
215215
}
216216

217217
default:
218-
panic(fmt.Sprintf("AddLines handles strings, plotter.XYers and *plotter.Function, got %T", t))
218+
panic(fmt.Sprintf("plotutil: AddLines handles strings, plotter.XYers and *plotter.Function, got %T", t))
219219
}
220220
}
221221
plt.Add(ps...)
@@ -267,7 +267,7 @@ func AddLinePoints(plt *plot.Plot, vs ...interface{}) error {
267267
}
268268

269269
default:
270-
panic(fmt.Sprintf("AddLinePoints handles strings and plotter.XYers, got %T", t))
270+
panic(fmt.Sprintf("plotutil: AddLinePoints handles strings and plotter.XYers, got %T", t))
271271
}
272272
}
273273
plt.Add(ps...)
@@ -322,7 +322,7 @@ func AddErrorBars(plt *plot.Plot, vs ...interface{}) error {
322322
if added {
323323
continue
324324
}
325-
panic(fmt.Sprintf("AddErrorBars expects plotter.XErrorer or plotter.YErrorer, got %T", v))
325+
panic(fmt.Sprintf("plotutil: AddErrorBars expects plotter.XErrorer or plotter.YErrorer, got %T", v))
326326
}
327327
plt.Add(ps...)
328328
return nil

plotutil/errorpoints.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func MeanAndConf95(vls []float64) (mean, lowerr, higherr float64) {
9696
func MedianAndMinMax(vls []float64) (med, lowerr, higherr float64) {
9797
n := len(vls)
9898
if n == 0 {
99-
panic("MedianAndMinMax: No values")
99+
panic("plotutil: MedianAndMinMax: No values")
100100
}
101101
if n == 1 {
102102
return vls[0], 0, 0

0 commit comments

Comments
 (0)