myException pear package
, (*1)
License
Copyright (c) 2018 JoungKyun.Kim <http://oops.org> All rights reserved, (*2)
This program is under BSD license, (*3)
Description
This is extended php exception., (*4)
Installation
We recommand to install with pear command cause of dependency pear packages., (*5)
1. use pear command
[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:, (*6)
[root@host ~]$ pear upgrade oops/myException
2. use composer
-
first, make composer.json as follow:, (*7)
{
"require": {
"joungkyun/myexception": "1.0.*"
}
}
-
and, install myException package, (*8)
[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., (*9)
Usages
Refence siste: http://pear.oops.org/docs/myException/myException.html, (*10)
reference is written by Korean. If you can't read korean, use google translator., (*11)
getMessage (), $e->getCode (), $e);
}
}
}
$m = new myEX;
try {
$m->foo ();
} catch ( Exception $e ) {
echo $e->Message () . "\n";
print_r ($e->TraceAsArray ()) . "\n";
$e->finalize ();
}
?>