xtclang / xvm

Ecstasy and XVM
Other
201 stars 17 forks source link

Add Runtime.logRuntimeException() API #216

Closed ggleyzer closed 4 months ago

ggleyzer commented 4 months ago

While working on the platform (host.xqiz.it) I realized that when the platform code calls some library methods that fail and then decides to pass the underlying exception message to the client (CLI or browser), that original exception message may contain some information that we should not reveal to the outside world. As a solution, I added Runtime.logRuntimeException() function that takes a potentially confidential text and turns it into a tag message. The original message gets logged to the system console, while the tag gets thrown.