Commit 1b78e25 1 parent ec81203 commit 1b78e25 Copy full SHA for 1b78e25
File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1698,6 +1698,35 @@ Stacktrace:
1698
1698
"""
1699
1699
FieldError
1700
1700
1701
+ """
1702
+ PropertyError(type::DataType, field::Symbol)
1703
+
1704
+ An operation tried to access invalid `property` of `type`.
1705
+
1706
+ !!! compat "Julia 1.12"
1707
+ Prior to Julia 1.12, invalid field access threw an [`ErrorException`](@ref)
1708
+
1709
+ See [`getfield`, `FieldError``](@ref)
1710
+
1711
+ # Examples
1712
+ ```jldoctest
1713
+ julia> struct AB
1714
+ a::Float32
1715
+ b::Float64
1716
+ end
1717
+
1718
+ julia> ab = AB(1, 3)
1719
+ AB(1.0f0, 3.0)
1720
+
1721
+ julia> ab.c # field `c` doesn't exist
1722
+ ERROR: PropertyError: instance of `AB`` has no property `c`
1723
+ Stacktrace:
1724
+ [...]
1725
+ ```
1726
+ """
1727
+ PropertyError
1728
+
1729
+
1701
1730
"""
1702
1731
WrappedException(msg)
1703
1732
You can’t perform that action at this time.
0 commit comments