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
Copy file name to clipboardExpand all lines: docs/API:-The-SplFault-Class.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ A value does not match with a set of values.
75
75
exceptables
76
76
-----------
77
77
78
+
---
78
79
Corresponding Exceptable classes are provided for each SplFault case. Each also extends from the core SPL exception class of the same name, sharing semantic meaning and allowing interoperability with code that is unaware of the exceptable types.
Seriously? Yes, seriously, that's it. If you want to skip to the end now you can. Go ahead and start writing your application code, returning and/or throwing these faults.
26
26
27
+
### error messages
28
+
27
29
You can build messages for your faults using the intl extension and ICU resource bundles. If you don't, then the error message will just be the name of the fault.
// ProcessFault.NotReady: Example is not ready (status is 'preparing')
62
67
```
63
-
_Note, using `EnumeratesFaults` means the fault will_ never _try to look up messages on your registered message bundles. The `makeMessage()` method is still available, and_ will _look up messages if they are registered, but is not used internally._
68
+
> Note, using `EnumeratesFaults` means the fault will _never_ try to look up messages on your registered message bundles. The `makeMessage()` method is still available, and _will_ look up messages if they are registered, but is not used internally.
64
69
65
70
### customized behavior
66
71
67
72
Sensible default behavior is provided by `IsFault` and `EnumeratesFaults`, but there are some aspects that can be customized.
68
73
69
-
During development, it is _highly_ recommended that you enable assertion checking. The exceptable library uses assertions to sanity-check your modifications - for example, that `exceptableType()` returns a suitable classname. In production, assertions can be safely disabled (and generally, should).
74
+
> Note, During development, it is _highly_ recommended that you enable assertion checking. The exceptable library uses assertions to sanity-check your modifications - for example, that `exceptableType()` returns a suitable classname. In production, assertions can be safely disabled (and generally, should).
0 commit comments