mirror of
https://github.com/tursom/GoCollections.git
synced 2025-02-07 00:14:36 +08:00
add TypeCastException
This commit is contained in:
parent
143d28dcae
commit
8725d7b4a5
@ -12,8 +12,6 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"github.com/tursom/GoCollections/exceptions"
|
||||
)
|
||||
|
||||
type TypeCastException struct {
|
||||
@ -83,10 +81,6 @@ func ForceCast[T any](v unsafe.Pointer) *T {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *TypeCastException) Cause() exceptions.Exception {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *TypeCastException) Error() string {
|
||||
return fmt.Sprintf("TypeCastException: %s\ncause by: %s", t.message, t.cause)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user