0
0
Fork 0
mirror of https://github.com/verdigado/organization_folders.git synced 2024-11-24 13:40:27 +01:00
organization_folders/lib/Errors/NotFoundException.php

14 lines
415 B
PHP

<?php
namespace OCA\OrganizationFolders\Errors;
abstract class NotFoundException extends \RuntimeException {
public function __construct($entity, array|string $criteria) {
$message = sprintf(
"Could not find %s with criteria %s",
class_exists($entity) ? array_pop(explode('\\', $entity)) : $entity,
is_string($criteria) ? $criteria : json_encode($criteria),
);
parent::__construct($message);
}
}