diff --git a/node.go b/node.go index b2dfac9..85c764e 100644 --- a/node.go +++ b/node.go @@ -355,12 +355,12 @@ func (this *conversionState) convertNoFreeFloating(n_ node.Node) (string, error) // Treat as an err return // FIXME we don't know the default return type for the function we're in - // If the expr is a string literal, we can convert it to errors.New() - // Although we probably can't do this in general for stringly-typed expressions + // PHP can only throw objects, not literals/scalars + // If the expr is just new Exception, we can convert it to errors.New() - if str, ok := n.Expr.(*scalar.String); ok { - return "return nil, errors.New(" + str.Value + ")\n", nil - } + //if str, ok := n.Expr.(*scalar.String); ok { + // return "return nil, errors.New(" + str.Value + ")\n", nil + //} child, err := this.convert(n.Expr) if err != nil {