vikkio88/slime-framework

View on GitHub
src/Lib/Slime/Exceptions/SlimeException.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php


namespace App\Lib\Slime\Exceptions;

use Exception;

class SlimeException extends Exception
{
    protected $code = 500;
    protected $message = "Ops!";
    protected $payload = null;

    public function __construct($message = null)
    {
        $message = $message ?: $this->message;
        parent::__construct($message, $this->code);
    }

    public function getPayload()
    {
        return $this->payload;
    }

}