add TypeCastException

This commit is contained in:
tursom 2022-11-26 13:45:11 +08:00
parent 143d28dcae
commit 8725d7b4a5

View File

@ -12,8 +12,6 @@ import (
"os" "os"
"strings" "strings"
"unsafe" "unsafe"
"github.com/tursom/GoCollections/exceptions"
) )
type TypeCastException struct { 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 { func (t *TypeCastException) Error() string {
return fmt.Sprintf("TypeCastException: %s\ncause by: %s", t.message, t.cause) return fmt.Sprintf("TypeCastException: %s\ncause by: %s", t.message, t.cause)
} }