Compare commits

...

2 Commits

Author SHA1 Message Date
eefb9ac9f5 v0.0.192 2023-07-24 11:30:07 +02:00
468a7d212d v0.0.191 2023-07-24 11:18:25 +02:00
3 changed files with 6 additions and 10 deletions

View File

@@ -13,6 +13,7 @@ var (
CatForeign = ErrorCategory{"Foreign"} // A foreign error that some component threw (e.g. an unknown mongodb error), happens if we call Wrap(..) on an non-bmerror value
)
//goland:noinspection GoUnusedGlobalVariable
var AllCategories = []ErrorCategory{CatWrap, CatSystem, CatUser, CatForeign}
type ErrorSeverity struct{ Severity string }
@@ -26,6 +27,7 @@ var (
SevFatal = ErrorSeverity{"Fatal"}
)
//goland:noinspection GoUnusedGlobalVariable
var AllSeverities = []ErrorSeverity{SevTrace, SevDebug, SevInfo, SevWarn, SevErr, SevFatal}
type ErrorType struct {
@@ -33,6 +35,7 @@ type ErrorType struct {
DefaultStatusCode *int
}
//goland:noinspection GoUnusedGlobalVariable
var (
TypeInternal = ErrorType{"INTERNAL_ERROR", langext.Ptr(500)}
TypePanic = ErrorType{"PANIC", langext.Ptr(500)}
@@ -51,7 +54,7 @@ var (
// other values come from pkgconfig
)
func NewType(key string, defStatusCode *int) {
func NewType(key string, defStatusCode *int) ErrorType {
return ErrorType{key, defStatusCode}
}

View File

@@ -50,10 +50,3 @@ func (ac *AppContext) RequestURI() string {
return ""
}
}
func (ac *AppContext) FinishSuccess(res HTTPResponse) HTTPResponse {
if ac.cancelled {
panic("Cannot finish a cancelled request")
}
return res
}

View File

@@ -1,5 +1,5 @@
package goext
const GoextVersion = "0.0.190"
const GoextVersion = "0.0.192"
const GoextVersionTimestamp = "2023-07-24T11:16:57+0200"
const GoextVersionTimestamp = "2023-07-24T11:30:07+0200"