varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.46k stars 65 forks source link

Kobweb CLI should highlight Gradle exceptions #180

Closed bitspittle closed 1 year ago

bitspittle commented 1 year ago

Sometimes, the Kobweb plugin communicates something bad happened by throwing an exception. For example, if you have duplicate routes, you might get:

1: Task failed with an exception.                                               
-----------                                                                     
* What went wrong:                                                              
Execution failed for task ':site:kobwebGenSiteEntry'.                           
> The route "/" was defined more than once (see the following locations):       
  - multimodule.pages.HomePage                                                  
  - multimodule.lib.pages.HomePage                                              

Followed by just a bunch of barfed callstack garbage.

It would be really nice if it detected those messages and surfaced them closer to the command prompt (like it already does with warnings and errors)

bitspittle commented 1 year ago

If we fix this, we can also clean up the FrontendData / BackendData assert functions, which really should throw instead of logging errors.