public static function detect($html, &$error = '') {
		if (!class_exists('Whoops\Run')) {
			return false;
		}

		if (strpos($html, 'class="Whoops container"') != false) {
			// temporarily disables libxml warnings
			libxml_use_internal_errors(true);
			$dom = new \DOMDocument();
			$dom->loadHTML($html);
			$xpath = new \DOMXpath($dom);
			$results = $xpath->query("//span[@id='plain-exception']");
			libxml_use_internal_errors(false);

			if (!is_null($results)) {
				$error = $results[0]->nodeValue;
			}

			return true;
		}

		return false;
	}