Class Error
Provides static utilities for Error.
Inheritance
System.Object
Error
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Maki
Assembly: Maki.dll
Syntax
public static class Error
Methods
| Improve this Doc View SourceMake<T>(Func<T>)
Creates an Error containing the result of calling the given function.
Declaration
public static Error<T> Make<T>(Func<T> func)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T> | func | Function to call. |
Returns
Type | Description |
---|---|
Error<T> | Error containing either the result of the function or an exception. |
Type Parameters
Name | Description |
---|---|
T | Error type. |
MakeException<T>(Exception)
Creates a new Error containing an exception.
Declaration
public static Error<T> MakeException<T>(Exception e)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | e | Exception to hold in the new Error. |
Returns
Type | Description |
---|---|
Error<T> | Error containing the given exception. |
Type Parameters
Name | Description |
---|---|
T | Error type. |
MakeValue<T>(T)
Creates a new Error containing a value.
Declaration
public static Error<T> MakeValue<T>(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Item to hold in the new Error. |
Returns
Type | Description |
---|---|
Error<T> | Error containing the given item. |
Type Parameters
Name | Description |
---|---|
T | Error type. |