Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / vendor / jcalderonzumba / gastonjs / src / Exception / JSErrorItem.php
1 <?php
2
3 namespace Zumba\GastonJS\Exception;
4
5 /**
6  * Class JSErrorItem
7  * @package Zumba\GastonJS\Exception
8  */
9 class JSErrorItem {
10   /** @var  mixed */
11   protected $message;
12   /** @var  mixed */
13   protected $stack;
14
15   /**
16    * @param $message
17    * @param $stack
18    */
19   public function __construct($message, $stack) {
20     $this->message = $message;
21     $this->stack = $stack;
22   }
23
24   /**
25    * String representation of the class
26    * @return string
27    */
28   public function __toString() {
29     return sprintf("%s\n%s", $this->message, $this->stack);
30   }
31 }