# Exception extends

- Thread: https://externals.io/message/894
- Original archive: https://news-web.php.net/php.internals/894
- Started by michel@ziobudda.net on 2003-04-14T06:55:20+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #894 — michel@ziobudda.net — 2003-04-14T06:55:20+00:00

URL: https://externals.io/message/894#894

Hi, I'm writing my exception class based on default and zend 
integrated Exception Class, but (always there is a bug) why when I make 

class MyE extends Exception {
//bla bla bla

}

into MyE class I don't have getline() and getfile() (from Exception 
Class)???

tnx.


-- 
Morelli Michel
ZioBudda.net Coordinator
michel@ziobudda.net

---

## #895 — epplestun — 2003-04-14T07:17:19+00:00

URL: https://externals.io/message/894#895 · In reply to: #894

In phpbuilder.com you have an article of php5 by Luis Argerich, here you
have a simple code of exceptions.

<?php
class WeirdProblem extends Exception {

   private $data;

   function WeirdProblem($data) {
        parent::exception();
        $this->data = $data;
    }

    function getMessage() {
        return $this->data . " caused a weird exception!";
    }
}
?>

----- Original Message -----
From: <michel@ziobudda.net>
To: <internals@lists.php.net>
Sent: Monday, April 14, 2003 8:55 AM
Subject: [PHP-DEV] Exception extends


> Hi, I'm writing my exception class based on default and zend
> integrated Exception Class, but (always there is a bug) why when I make
>
> class MyE extends Exception {
> //bla bla bla
>
> }
>
> into MyE class I don't have getline() and getfile() (from Exception
> Class)???
>
> tnx.
>
>
> --
> Morelli Michel
> ZioBudda.net Coordinator
> michel@ziobudda.net
