apple / pkl

A configuration as code language with rich validation and tooling.
https://pkl-lang.org
Apache License 2.0
10.15k stars 270 forks source link

Catch PklException errors coming from project load #527

Closed bioball closed 3 months ago

bioball commented 3 months ago

This fixes an issue where an error coming from loading a project file is shown as a PklBugException.

There were two problems here:

  1. proxyAddress needs to be a lazy value, because it can try to load a PklProject
  2. accessing proxyAddress can throw a PklException, so it needs to be within the try/catch