move important exceptions to package lang

This commit is contained in:
tursom 2022-11-26 14:07:29 +08:00
parent acd5df2410
commit 61d0de3f4b
5 changed files with 5 additions and 5 deletions

View File

@ -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")),
} }
} }

View File

@ -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")),
} }
} }

View File

@ -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")),
} }
} }

View File

@ -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")),
} }
} }

View File

@ -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")),
} }
} }