php - How can I make a custom exception object evaluate to false in an if condition? -


I was just thinking that if I make my object wrong, the reason for this is that I create a custom exception class I am here. I would like to be able to do something on the lines of

  class dog {public function lookAround () (see dog ()) {layer of bark;} and {return sit;}} public Function seeDog () {If (object == dog) {return "hoarse";} and {return Dog_Exception (no_see);}}}  

I think this is a terrible silly example However, the issue is that as the object, if (see dog ()) test string "hoarse" and dog_exception both To evaluate true for the object, if possible, to evaluate the dog_exception to false , if if In such a situation, I will not have to do this like this, for example, create a code such as type (seedog) == dog_exception) etc. I suspect that this is possible, but any help would be great thanks!

Why are you refusing an exception? Do not you want to throw it?


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -