Hands-On Serverless Applications with Kotlin
上QQ阅读APP看书,第一时间看更新

Exceptions and error handling

Depending on the execution environment, a Lambda execution function can have platform-specific constructs for signaling errors and exception handling. For Java, the try/catch semantics can be used. For GoLang, the error paradigm is used.

The Lambda platform takes care of serializing the error's context, like the cause, stacktrace, and so on, should an exception be thrown, and it also makes it available to the caller.