ILIAS  release_8 Revision v8.24
BadgeException.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ilBadge;
24use ilException;
25use Throwable;
26
28{
29 public const EXCEPTION_FILE_NOT_FOUND = 1;
31
32 private ilBadge $badge;
33
34 public function __construct(int $code, ilBadge $badge, ?ilException $previous_exception = null)
35 {
36 parent::__construct('', $code, $previous_exception);
37 $this->badge = $badge;
38
39 }
40
41 public static function uploadedBadgeImageFileNotFound(ilBadge $badge, ?ilException $previous_exception = null): self
42 {
43 return new self(self::EXCEPTION_FILE_NOT_FOUND, $badge, $previous_exception);
44 }
45
46 public static function moveUploadedBadgeImageFailed(ilBadge $badge, ?ilException $previous_exception = null): self
47 {
48 return new self(self::EXCEPTION_MOVE_UPLOADED_IMAGE_FAILED, $badge, $previous_exception);
49 }
50}
__construct(int $code, ilBadge $badge, ?ilException $previous_exception=null)
static uploadedBadgeImageFileNotFound(ilBadge $badge, ?ilException $previous_exception=null)
static moveUploadedBadgeImageFailed(ilBadge $badge, ?ilException $previous_exception=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc