Version 1
[yaffs-website] / vendor / jcalderonzumba / gastonjs / src / Exception / JSErrorItem.php
diff --git a/vendor/jcalderonzumba/gastonjs/src/Exception/JSErrorItem.php b/vendor/jcalderonzumba/gastonjs/src/Exception/JSErrorItem.php
new file mode 100644 (file)
index 0000000..2fa205a
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace Zumba\GastonJS\Exception;
+
+/**
+ * Class JSErrorItem
+ * @package Zumba\GastonJS\Exception
+ */
+class JSErrorItem {
+  /** @var  mixed */
+  protected $message;
+  /** @var  mixed */
+  protected $stack;
+
+  /**
+   * @param $message
+   * @param $stack
+   */
+  public function __construct($message, $stack) {
+    $this->message = $message;
+    $this->stack = $stack;
+  }
+
+  /**
+   * String representation of the class
+   * @return string
+   */
+  public function __toString() {
+    return sprintf("%s\n%s", $this->message, $this->stack);
+  }
+}