Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 8326cf5

Browse files
committed
Added the exception class and updated composer file
1 parent 5720cfd commit 8326cf5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "repox/swipbox",
3+
"version": "1.0.1-dev",
4+
"type": "library",
35
"description": "Client Library for Swipbox API integration",
46
"license": "MIT",
57
"authors": [

src/Swipbox/Exception.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php namespace Swipbox;
2+
3+
class Exception extends \Exception
4+
{
5+
public function __construct($message, $code = 0, Exception $previous = null)
6+
{
7+
parent::__construct($message, $code, $previous);
8+
}
9+
10+
public function __toString()
11+
{
12+
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
13+
}
14+
}

0 commit comments

Comments
 (0)