Typescript Throw New Exception In Php