diff options
Diffstat (limited to 'model/utils.go')
-rw-r--r-- | model/utils.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/model/utils.go b/model/utils.go index 0ce243fe7..05143b20d 100644 --- a/model/utils.go +++ b/model/utils.go @@ -93,6 +93,18 @@ func AppErrorFromJson(data io.Reader) *AppError { } } +func NewAppError(where string, id string, params map[string]interface{}, details string, status int) *AppError { + ap := &AppError{} + ap.Id = id + ap.params = params + ap.Message = id + ap.Where = where + ap.DetailedError = details + ap.StatusCode = status + ap.IsOAuth = false + return ap +} + func NewLocAppError(where string, id string, params map[string]interface{}, details string) *AppError { ap := &AppError{} ap.Id = id |