/** * Static constructor to create from a `PhpSchool\PhpWorkshop\Exception\CodeExecutionException` exception. * * @param RequestInterface $request The request that caused the failure. * @param CodeExecutionException $e The exception. * @return static The result. */ public static function fromRequestAndCodeExecutionFailure(RequestInterface $request, CodeExecutionException $e) { return new static($request, $e->getMessage()); }
public function testException() { $e = new CodeExecutionException('nope'); $this->assertEquals('nope', $e->getMessage()); }
/** * @param string $name * @param CodeExecutionException $e * @return static */ public static function fromNameAndCodeExecutionFailure($name, CodeExecutionException $e) { return new static($name, $e->getMessage()); }
/** * Static constructor to create from a `PhpSchool\PhpWorkshop\Exception\CodeExecutionException` exception. * * @param ArrayObject $args The arguments that caused the failure. * @param CodeExecutionException $e The exception. * @return static The result. */ public static function fromArgsAndCodeExecutionFailure(ArrayObject $args, CodeExecutionException $e) { return new static($args, $e->getMessage()); }