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

15 lines
415 B
PHP
Raw Normal View History

<?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);
}
}