public function logCliErrorWithException($msg, $e) { echo "*** error: {$msg}" . PHP_EOL . PHP_EOL . "This was caused by an unexpected exception " . get_class($e) . PHP_EOL . PHP_EOL . $e->getTraceAsString(); }