func NewNamedError(err error) *DefaultNamedError {
	if namedErr, ok := err.(NamedError); ok {
		return &DefaultNamedError{Err: namedErr.Error(), Name: namedErr.ErrorName()}
	}
	return &DefaultNamedError{Err: err.Error()}
}
func NewNamedError(err error) *DefaultNamedError {
	if namedErr, ok := err.(NamedError); ok {
		return &DefaultNamedError{Err: namedErr.Error(), Name: namedErr.ErrorName()}
	}
	return &DefaultNamedError{Err: err.Error()}
}
func NewNamedError ( err error ) * DefaultNamedError { if namedErr , ok := err . ( NamedError ) ; ok { return & DefaultNamedError { Err : namedErr . Error ( ) , Name : namedErr . ErrorName ( ) } } return & DefaultNamedError { Err : err . Error ( ) } }
// NewNamedError creates a NamedError.
NewNamedError creates a NamedError .