/var/www/html_us/wp-content/plugins/wp-smtp/vendor/lucatume/di52/src/NestedParseError.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
 * Class used to handle the special case of a parse error in a nested dependency
 * and bubble its nature up.
 *
 * @package lucatume\DI52;
 */

namespace lucatume\DI52;

use 
Throwable;

/**
 * Class NestedParseError.
 *
 * @package lucatume\DI52;
 */
class NestedParseError extends \Exception
{
    
/**
     * The type of the entity being loaded.
     *
     * @var string
     */
    
private $type;

    
/**
     * The name of the entity being loaded.
     *
     * @var string
     */
    
private $name;

    
/**
     * NestedParseError constructor.
     *
     * @param string $message The Exception message to throw.
     * @param int $code The Exception code.
     * @param Throwable|null $previous The previous exception used for the exception chaining.
     * @param string $type The type of the entity being loaded.
     * @param string $name The name of the entity being loaded.
     */
    
public function __construct($message ""$code 0Throwable $previous null$type ''$name '')
    {
        
parent::__construct($message$code$previous);
        
$this->type $type;
        
$this->name $name;
    }

    
/**
     * Returns the type of the entity being loaded.
     *
     * @return string
     */
    
public function getType()
    {
        return 
$this->type;
    }

    
/**
     * Returns the name of the entity being loaded.
     *
     * @return string
     */
    
public function getName()
    {
        return 
$this->name;
    }
}