nextcloud_groupfolder_files.../lib/Exceptions/NotFoundException.php

15 lines
421 B
PHP
Raw Normal View History

2023-09-20 22:53:02 +02:00
<?php
namespace OCA\GroupfolderFilesystemSnapshots\Exceptions;
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);
}
}