haxe
haxe copied to clipboard
[PHP] class ErrorException conflict with php's native ErrorException
I think there is a conflict with php's native ErrorException class becasue this compiles fine but fails on runtime :
class ErrorException extends haxe.Exception{
public function new(msg:String){
super(msg);
}
}
class Main{
static function main(){
var e = new ErrorException("error");
trace(e.details());
}
}
Gives that at runtime :
PHP Fatal error: Uncaught Error: Call to undefined method ErrorException::details() in /test/bin/lib/Main.php:18
Stack trace:
#0 /test/bin/index.php(13): Main::main()
#1 {main}
thrown in /test/bin/lib/Main.php on line 18
I think there is nothing to do here but to be aware to not use class name's that already exist on specific plateforms... :/