Skip to Main Content
Professional Sitecore Development
book

Professional Sitecore Development

by John West
May 2012
Intermediate to advanced content levelIntermediate to advanced
552 pages
15h 43m
English
Wrox
Content preview from Professional Sitecore Development

Chapter 5

Error Management

What's in This Chapter?

Trapping exceptions with try...catch blocks

Managing exceptions in XSL renderings, sublayouts, and web controls

Handling exceptions at the application level with the global.asax file

Redirecting to friendly error pages

This chapter describes error-management techniques that you can use with Sitecore solutions, including some provided by ASP.NET itself. You can trap errors at a number of layers, including the code, component, page, and application levels. This chapter covers error-management facilities from the lowest layer up to the highest.

Sitecore error management applies only to HTTP requests handled by Sitecore, which handles most of the requests that IIS handles with ASP.NET. As described in this chapter, Sitecore error management varies according to the configuration defined under the /configuration/system.web/customErrors element in the Web.config file.

Sitecore attempts to log every exception that it encounters. Such log entries include stack traces. An optimized Sitecore solution should log few or no exceptions. You should attempt to identify all potential errors in development and test environments before deploying that code to production. For more information about Sitecore logging, see Chapter 6. For more information about error management with the Sitecore ASP.NET content management system (CMS), see The Sitecore Presentation Component API Cookbook (http://bit.ly/r76c6K). In fact, much of the information and code ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
Enterprise Application Development with C# 9 and .NET 5

Enterprise Application Development with C# 9 and .NET 5

Ravindra Akella, Rishabh Verma, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu

Publisher Resources

ISBN: 9781118235256Purchase book