DoclerLabs / hexMachina

Releases, issues, documentation, website of hexMachina, framework written in Haxe
http://hexmachina.org
MIT License
44 stars 8 forks source link

Compile time exception when trying to instantiate class without a constructor from flow #303

Closed back2dos closed 6 years ago

back2dos commented 6 years ago

There's a null pointer exception here: https://github.com/DoclerLabs/hexDSL/blob/master/src/hex/compiletime/factory/ClassInstanceFactory.hx#L50

There should obviously be an error, but perhaps a more informative one, without a panic-inducing stack trace ;)

FrancisBourre commented 6 years ago

Thanks for the report. I think it happened with the previous release on haxelib. The new release brings many improvements to error reporting and you should have consistent error message now. Was unable to reproduce: Building HexMachina Running Pre-Build Command Line... cmd: cmd /c haxe hm.hxml hexdsl/test/context/flow/instanceWithoutConstructor.flow:4: characters 12-50 : hex.mock.ClassWithoutConstructor does not have a constructor hexdsl/src/hex/compiletime/util/ContextUtil.hx:113: lines 113-117 : Defined in this class Build halted with errors. Done(1)