You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setter is missing, the error prints out the message @abracadabra must be <integer>, not <double> so users know the cause of error
some_int<-S7::new_class(
name="some_int",
properties=list(
abracadabra=S7::new_property(
class=S7::class_integer
)
)
)
some_int(abracadabra=1.1)
#> Error: <some_int> object properties are invalid:#> - @abracadabra must be <integer>, not <double>
When setter is made, the error message is not informative
another_int<-S7::new_class(
name="another_int",
properties=list(
abracadabra=S7::new_property(
class=S7::class_integer,
setter=function(self, value) {
self@abracadabra<- as.integer(value)
}
)
)
)
another_int(abracadabra=1.1)
#> Error: `object` must be an <S7_object>, not a <integer>
The text was updated successfully, but these errors were encountered:
dipterix
changed the title
Class & property names are missing from error message when setter is set
Class & property names are missing from error message when setter is used
Aug 3, 2024
When
setter
is missing, the error prints out the message@abracadabra must be <integer>, not <double>
so users know the cause of errorWhen
setter
is made, the error message is not informativeCreated on 2024-08-03 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: