Failing.php

Same filename and directory in other branches
  1. 10 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/Operation/test/Failing.php

Namespace

Drupal\image_test\Plugin\ImageToolkit\Operation\test

File

core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/Operation/test/Failing.php

View source
<?php

namespace Drupal\image_test\Plugin\ImageToolkit\Operation\test;

use Drupal\Core\ImageToolkit\Attribute\ImageToolkitOperation;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * An image toolkit operation that throws a \RuntimeException.
 */
class Failing extends OperationBase {
    
    /**
     * {@inheritdoc}
     */
    public function execute(array $arguments) {
        throw new \RuntimeException('Ahem, this image operation failed');
    }

}

Classes

Title Deprecated Summary
Failing An image toolkit operation that throws a \RuntimeException.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.