Documentation
¶
Index ¶
Constants ¶
View Source
const RethrowPanic = "___throw_it___"
RethrowPanic Special re-throw panic
Variables ¶
This section is empty.
Functions ¶
Types ¶
type It ¶
type It struct {
Error E
// contains filtered or unexported fields
}
It structure
func Perform ¶
Perform registers the main-logic function and executes it. Parameters:
- funcToTry: The main logic to execute within the try block.
Returns:
- *It: An instance of the It structure containing the result and error (if any).
func (*It) Catch ¶
Catch registers the error-handling function that is executed if an error occurs. Parameters:
- funcCaught: The function to handle the error, which receives the error as a parameter.
Returns:
- *It: The same instance of the It structure for chaining.
Click to show internal directories.
Click to hide internal directories.