Assets/Scripts/Wallet/CoroutineUtils.cs
/// <summary>
/// Start a coroutine that might throw an exception. Call the callback with the exception if it
/// does or null if it finishes without throwing an exception.
/// </summary>
/// <param name="monoBehaviour">MonoBehaviour to start the coroutine on</param>
/// <param name="enumerator">Iterator function to run as the coroutine</param>
/// <param name="done">Callback to call when the coroutine has thrown an exception or finished.
/// The thrown exception or null is passed as the parameter.</param>
/// <returns>The started coroutine</returns>
Start a coroutine that might throw an exception. Call the callback with the exception if it
does or null if it finishes without throwing an exception.
Start a coroutine that might throw an exception . Call the callback with the exception if it does or null if it finishes without throwing an exception .
public static Coroutine StartThrowingCoroutine(
		this MonoBehaviour monoBehaviour,
		IEnumerator enumerator,
		Action<Exception> done
	)
	{
		return monoBehaviour.StartCoroutine(RunThrowingIterator(enumerator, done));
	}
public static Coroutine StartThrowingCoroutine ( this MonoBehaviour monoBehaviour , IEnumerator enumerator , Action < Exception > done ) { return monoBehaviour . StartCoroutine ( RunThrowingIterator ( enumerator , done ) ) ; }
Start a coroutine that might throw an exception.
Start a coroutine that might throw an exception .
The started coroutine
The started coroutine
MonoBehaviour
this
enumerator
IEnumerator
Iterator function to run as the coroutine
Iterator function to run as the coroutine
done
Action<Exception>
Callback to call when the coroutine has thrown an exception or finished.
The thrown exception or null is passed as the parameter.
Callback to call when the coroutine has thrown an exception or finished . The thrown exception or null is passed as the parameter .
monoBehaviour
MonoBehaviour to start the coroutine on
MonoBehaviour to start the coroutine on