Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Serverless computing in Azure with .NET

You're reading from   Serverless computing in Azure with .NET Build, test, and automate deployment

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781787288393
Length 468 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sasha Rosenbaum Sasha Rosenbaum
Author Profile Icon Sasha Rosenbaum
Sasha Rosenbaum
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Understanding Serverless Architecture FREE CHAPTER 2. Getting Started with the Azure Environment 3. Setting Up the Development Environment 4. Configuring Endpoints, Triggers, Bindings, and Scheduling 5. Integrations and Dependencies 6. Integrating Azure Functions with Cognitive Services API 7. Debugging Your Azure Functions 8. Testing Your Azure Functions 9. Configuring Continuous Delivery 10. Securing Your Application 11. Monitoring Your Application 12. Designing for High Availability, Disaster Recovery, and Scale 13. Designing Cost-Effective Services 14. C# Script-Based Functions 15. Azure Compute On-Demand Options

Handling errors


The exception handling process in a .NET-based Function App is similar to any other .NET application. Best practices for handling exceptions in .NET can be found at the following two links:

We will not elaborate on best practices further in this book.

Let us, instead, outline the error handling in Functions Core tools local environment for two cases--handled and unhandled exceptions.

To demonstrate exception handling, let us create another timer-triggered function called ErrorFunction. To do so, follow the same steps as in the previous section on creating the test function, and move on to the following steps:

  1. When the function is created, open the ErrorFunction.cs file, and paste the following code. As you can see, the following code generates an unhandled exception:
        using System;
        using Microsoft...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime