public static function fromFactory( $factory, $interface, $exception = null ) {
		$reason = $exception instanceof Exception
			? " Reason: {$exception->getMessage()}"
			: '';

		if ( is_callable( $factory ) ) {
			$message = sprintf(
				'Could not instantiate object of type "%1$s" from factory of type: "%2$s".%3$s',
				$interface,
				gettype( $factory ),
				$reason
			);
		} elseif ( is_string( $factory ) ) {
			$message = sprintf(
				'Could not instantiate object of type "%1$s" from class name: "%2$s".%3$s',
				$interface,
				$factory,
				$reason
			);
		} else {
			$message = sprintf(
				'Could not instantiate object of type "%1$s" from invalid argument of type: "%2$s".%3$s',
				$interface,
				$factory,
				$reason
			);
		}

		return new static( $message, 0, $exception );
	}