ooc-lang / rock

:ocean: self-hosted ooc compiler that generates c99
http://ooc-lang.org/
MIT License
404 stars 40 forks source link

rock throws exception on non-existent classpath elements #908

Closed fasterthanlime closed 9 years ago

fasterthanlime commented 9 years ago

It should be a warning at most

horasal commented 9 years ago

It seems that there's no clean way to throw a warning in front-end? Only middle-end can print a warning by Resolver throwError(Warning), but the resolver is not available in front-end.

fasterthanlime commented 9 years ago

That's true, the current workaround used in various parts of rock is to go through the token:

err := InternalError new(node token, "something")
node token module params errorHandler onError(err)

As for AstBuilder, you have direct access to params, so that should be even easier.

fasterthanlime commented 9 years ago

Closed in 784b3c31a155e415508ccbe861a37becb8a0a199