toTrustWeaveException

Extension function to convert any Throwable to a TrustWeaveException.

This function provides automatic conversion of standard exceptions to structured TrustWeaveException types for consistent error handling.