An open API service indexing awesome lists of open source software.

https://github.com/oops-org-php/myexception

Extended php exception
https://github.com/oops-org-php/myexception

Last synced: 4 months ago
JSON representation

Extended php exception

Awesome Lists containing this project

README

        

# myException pear package
![GitHub license](https://img.shields.io/badge/license-BSD-blue.svg)

## License

Copyright (c) 2018 JoungKyun.Kim <http://oops.org> All rights reserved

This program is under BSD license

## Description

This is extended php exception.

## Installation

We recommand to install with pear command cause of dependency pear packages.

### 1. use pear command

```bash
[root@host ~]$ # add pear channel 'pear.oops.org'
[root@host ~]$ pear channel-discover pear.oops.org
Adding Channel "pear.oops.org" succeeded
Discovery of channel "pear.oops.org" succeeded
downloading myException-1.0.1.tgz ...
Starting to download myException-1.0.1.tgz (3,048 bytes)
...done: 3,048 bytes
install ok: channel://pear.oops.org/myException-1.0.1
[root@host ~]$
```

If you wnat to upgarde version:

```bash
[root@host ~]$ pear upgrade oops/myException
```

### 2. use composer

1. first, make composer.json as follow:

```json
{
"require": {
"joungkyun/myexception": "1.0.*"
}
}
```

2. and, install myException package

```bash
[user@host project]$ php composer.phpt install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing joungkyun/myexception (1.0.1): Downloading (100%)
Writing lock file
Generating autoload files
[user@host project]$
```

### 3. install by hand

Get last release at https://github.com/OOPS-ORG-PHP/myException/releases and uncompress pakcage within PHP include_path.

## Usages

Refence siste: http://pear.oops.org/docs/myException/myException.html

reference is written by Korean. If you can't read korean, use [google translator](https://translate.google.com/translate?hl=ko&sl=ko&tl=en&u=http%3A%2F%2Fpear.oops.org%2Fdocs%2FmyException%2FmyException.html).

```php
getMessage (), $e->getCode (), $e);
}
}
}

$m = new myEX;

try {
$m->foo ();
} catch ( Exception $e ) {
echo $e->Message () . "\n";
print_r ($e->TraceAsArray ()) . "\n";
$e->finalize ();
}

?>
```