summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/utils.go10
-rw-r--r--model/utils_test.go2
2 files changed, 1 insertions, 11 deletions
diff --git a/model/utils.go b/model/utils.go
index 719a2ad1b..695d4a0cb 100644
--- a/model/utils.go
+++ b/model/utils.go
@@ -71,16 +71,6 @@ func AppErrorFromJson(data io.Reader) *AppError {
}
}
-func NewAppError(where string, message string, details string) *AppError {
- ap := &AppError{}
- ap.Message = message
- ap.Where = where
- ap.DetailedError = details
- ap.StatusCode = 500
- ap.IsOAuth = false
- return ap
-}
-
func NewLocAppError(where string, id string, params map[string]interface{}, details string) *AppError {
ap := &AppError{}
ap.Id = id
diff --git a/model/utils_test.go b/model/utils_test.go
index b8eabe264..02a08d113 100644
--- a/model/utils_test.go
+++ b/model/utils_test.go
@@ -27,7 +27,7 @@ func TestRandomString(t *testing.T) {
}
func TestAppError(t *testing.T) {
- err := NewAppError("TestAppError", "message", "")
+ err := NewLocAppError("TestAppError", "message", nil, "")
json := err.ToJson()
rerr := AppErrorFromJson(strings.NewReader(json))
if err.Message != rerr.Message {