mirror of
https://github.com/tursom/GoCollections.git
synced 2025-03-13 17:00:18 +08:00
move important exceptions to package lang
This commit is contained in:
parent
acd5df2410
commit
61d0de3f4b
@ -12,7 +12,7 @@ type ElementNotFoundException struct {
|
|||||||
|
|
||||||
func NewElementNotFoundException(message string, config *ExceptionConfig) *ElementNotFoundException {
|
func NewElementNotFoundException(message string, config *ExceptionConfig) *ElementNotFoundException {
|
||||||
return &ElementNotFoundException{
|
return &ElementNotFoundException{
|
||||||
NewRuntimeException(message, config.AddSkipStack(1).
|
*NewRuntimeException(message, config.AddSkipStack(1).
|
||||||
SetExceptionName("github.com.tursom.GoCollections.exceptions.ElementNotFoundException")),
|
SetExceptionName("github.com.tursom.GoCollections.exceptions.ElementNotFoundException")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ type IllegalParameterException struct {
|
|||||||
|
|
||||||
func NewIllegalParameterException(message string, config *ExceptionConfig) *IllegalParameterException {
|
func NewIllegalParameterException(message string, config *ExceptionConfig) *IllegalParameterException {
|
||||||
return &IllegalParameterException{
|
return &IllegalParameterException{
|
||||||
NewRuntimeException(message, config.AddSkipStack(1).
|
*NewRuntimeException(message, config.AddSkipStack(1).
|
||||||
SetExceptionName("github.com.tursom.GoCollections.exceptions.IllegalParameterException")),
|
SetExceptionName("github.com.tursom.GoCollections.exceptions.IllegalParameterException")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ type IndexOutOfBound struct {
|
|||||||
|
|
||||||
func NewIndexOutOfBound(message string, config *ExceptionConfig) *IndexOutOfBound {
|
func NewIndexOutOfBound(message string, config *ExceptionConfig) *IndexOutOfBound {
|
||||||
return &IndexOutOfBound{
|
return &IndexOutOfBound{
|
||||||
NewRuntimeException(message, config.AddSkipStack(1).
|
*NewRuntimeException(message, config.AddSkipStack(1).
|
||||||
SetExceptionName("github.com.tursom.GoCollections.exceptions.IndexOutOfBound")),
|
SetExceptionName("github.com.tursom.GoCollections.exceptions.IndexOutOfBound")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ type OperationNotSupportedException struct {
|
|||||||
|
|
||||||
func NewOperationNotSupportedException(message string, config *ExceptionConfig) *OperationNotSupportedException {
|
func NewOperationNotSupportedException(message string, config *ExceptionConfig) *OperationNotSupportedException {
|
||||||
return &OperationNotSupportedException{
|
return &OperationNotSupportedException{
|
||||||
NewRuntimeException(message, config.AddSkipStack(1).
|
*NewRuntimeException(message, config.AddSkipStack(1).
|
||||||
SetExceptionName("github.com.tursom.GoCollections.exceptions.OperationNotSupportedException")),
|
SetExceptionName("github.com.tursom.GoCollections.exceptions.OperationNotSupportedException")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ type WrongCallHostException struct {
|
|||||||
|
|
||||||
func NewWrongCallHostException(message string) WrongCallHostException {
|
func NewWrongCallHostException(message string) WrongCallHostException {
|
||||||
return WrongCallHostException{
|
return WrongCallHostException{
|
||||||
NewRuntimeException(message, DefaultExceptionConfig().AddSkipStack(1).
|
*NewRuntimeException(message, DefaultExceptionConfig().AddSkipStack(1).
|
||||||
SetExceptionName("github.com.tursom.GoCollections.exceptions.WrongCallHostException")),
|
SetExceptionName("github.com.tursom.GoCollections.exceptions.WrongCallHostException")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user