Function std.exception.handle
Handle exceptions thrown from range primitives.
						
				auto auto handle(E, RangePrimitive primitivesToHandle, alias handler, Range)
				(
				
				  Range input
				
				)
				
				if (isInputRange!Range);
						
					
				Use the RangePrimitive enum to specify which primitives to handle.
Multiple range primitives can be handled at once by using the OR operator
or the pseudo-primitives RangePrimitive and RangePrimitive.
All handled primitives must have return types or values compatible with the
user-supplied handler.
Parameters
| Name | Description | 
|---|---|
| E | The type of Throwableto handle. | 
| primitivesToHandle | Set of range primitives to handle. | 
| handler | The callable that is called when a handled primitive throws a Throwableof typeE. The handler must accept arguments of
    the formE, ref IRangeand its return value is used as the primitive's
    return value wheneverEis thrown. ForopIndex, the handler can
    optionally recieve a third argument; the index that caused the exception. | 
| input | The range to handle. | 
Returns
A wrapper struct that preserves the range interface of input.
Note
Infinite ranges with slicing support must return an instance of
std when sliced with a specific lower and upper
bound (see hasSlicing); handle deals with
this by takeing 0 from the return value of the handler function and
returning that when an exception is caught.
Example
import stdExample
import std