Esempio n. 1
0
 /**
  * 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());
 }
Esempio n. 3
0
 /**
  * @param string $name
  * @param CodeExecutionException $e
  * @return static
  */
 public static function fromNameAndCodeExecutionFailure($name, CodeExecutionException $e)
 {
     return new static($name, $e->getMessage());
 }
Esempio n. 4
0
 /**
  * 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());
 }