<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Blog posts by Hieu Doan</title><link href="http://world.optimizely.com" /><updated>2009-12-04T10:45:05.0000000Z</updated><id>https://world.optimizely.com/blogs/Hieu-Doan/</id> <generator uri="http://world.optimizely.com" version="2.0">Optimizely World</generator> <entry><title>Organize your Composer functions in the Toolbox</title><link href="https://world.optimizely.com/blogs/Hieu-Doan/Dates/2009/12/Organize-your-Composer-functions-in-the-Toolbox/" /><id>&lt;p&gt;I got a question from a customer that they wanted to organize theirs 30+ Composer functions in the toolbox somehow to make the life easier for the editors when they creating Composer content. This article will give you an instruction on how you can do that. &lt;/p&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h3&gt;Define category root for Composer&lt;/h3&gt;  &lt;p&gt;Composer uses the standard categories in EPiServer CMS for categorizing theirs functions. By default, Composer add a category in the first level with name “Extension Category” and define this as the root category for Composer.&amp;#160; Of course you can change the root by going to the Composer admin, under the tab “Settings” and select another category as root in the list “Category root for Composer”.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/c83bd4a129fa4d2f88d81e36b22e7fba.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image002&quot; border=&quot;0&quot; alt=&quot;clip_image002&quot; src=&quot;/link/837717cdeb7247e193e768a7bfd75123.jpg&quot; width=&quot;244&quot; height=&quot;82&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Creating Composer categories&lt;/h3&gt;  &lt;p&gt;Go to the tab “Categories” and add some categories. You can also doing this by using the EPiServer standard category manager (Admin&amp;#160; -&amp;gt; System Administration –&amp;gt; Edit categories) but only the first child level under the category, which was defined as root for Composer in previous step, will be used.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/9d250d45bf6d44e5b71b5191f6a113a3.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image002[5]&quot; border=&quot;0&quot; alt=&quot;clip_image002[5]&quot; src=&quot;/link/831d655c329d49dfb739183b1f2da8fc.jpg&quot; width=&quot;590&quot; height=&quot;299&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Categorizing Composer function&lt;/h3&gt;  &lt;p&gt;Now you can organize your functions by editing the Composer function definition under the tab “Function types” and select the category/categories.&lt;/p&gt;  &lt;h4&gt;&lt;/h4&gt;    &lt;p&gt;&lt;a href=&quot;/link/d4eff5124d1b4daea717b927be68fd06.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image002[7]&quot; border=&quot;0&quot; alt=&quot;clip_image002[7]&quot; src=&quot;/link/641d3962bc2d45669372376c18761e0f.jpg&quot; width=&quot;524&quot; height=&quot;459&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;And the result…&lt;/h3&gt;  &lt;p&gt;&lt;a href=&quot;/link/1ce0631736c1467c807d5d1a39b749ad.jpg&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image002[9]&quot; border=&quot;0&quot; alt=&quot;clip_image002[9]&quot; src=&quot;/link/a80b7569604246798abd6c5f56edaddc.jpg&quot; width=&quot;239&quot; height=&quot;572&quot; /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;That’s all. Now it’s easier to find the functions you want to work with. All functions that not been grouped by any category are placed under the “Uncategorized” group.&lt;/p&gt;</id><updated>2009-12-04T10:45:05.0000000Z</updated><summary type="html">Blog post</summary></entry> <entry><title>Handle the error in Composer function</title><link href="https://world.optimizely.com/blogs/Hieu-Doan/Dates/2009/11/Handle-the-error-in-Composer-function/" /><id>&lt;p&gt;It’s time to blog and my first post is about how we handle error when working with Composer function.&lt;/p&gt;  &lt;p&gt;I agree with &lt;a href=&quot;http://world.episerver.com/System/Users-and-profiles/Community-Profile-Card/?encryptedcurrentid=99duFmOp7IuDIH6I%2bYUp4eiriFexxcsk&quot;&gt;Fredrik Karlsson (Dropit)&lt;/a&gt; about what he wrote in his &lt;a href=&quot;http://labs.dropit.se/blogs/post/2009/11/11/Error-search-an-EPiServer-Composer-function-when-drag-and-drop-fails.aspx&quot;&gt;blog&lt;/a&gt; that Composer doesn’t&amp;#160; have a easy way to handle the error for the function. &lt;/p&gt;  &lt;p&gt;Most of you who’s working with Composer have seen this message some time&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;/link/f4636d308df94e5e8702aeb7698951d7.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/6ea79a4977b4450889eae0f99ee58401.png&quot; width=&quot;355&quot; height=&quot;58&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;and try to find something in log for what has going wrong, but didn’t find anything. What’s wrong?&lt;/p&gt;  &lt;h3&gt;How can we solve this issue?&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;1. Configure log4net for logging Composer&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We begin with configure the log4net for logging Composer. I recommend that we separate the log for Composer from EPiServer. It would be much easier to debug and find information. The best way to do this is creating a new log4net config with name “&lt;strong&gt;dropit.extension.config&lt;/strong&gt;” and put it under “bin” folder due to Composer try to find this config in first hand, and add two loggers for Composer assemblies Dropit.Extension &amp;amp; Dropit.Extension.UI,&amp;#160;&amp;#160; &lt;/p&gt;  &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;   &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;     &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &amp;lt;?xml version=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt; encoding=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/span&gt; ?&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; &amp;lt;configuration&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;   &amp;lt;configSections&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     &amp;lt;section name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;log4net&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;              type=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;log4net.Config.Log4NetConfigurationSectionHandler, log4net&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;   &amp;lt;/configSections&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;   &amp;lt;!-- This section contains the log4net configuration settings --&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;   &amp;lt;log4net&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;      &amp;lt;!-- Try the logview4net utility to listen to UDP-logs, download from sourceforge.net --&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;   &amp;lt;appender name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;udpLogAppender&amp;quot;&lt;/span&gt; type=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;log4net.Appender.UdpAppender&amp;quot;&lt;/span&gt; &amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;     &amp;lt;!-- Typical encoding values are Unicode/utf-16 or utf-8 or ascii. See System.Text.Encoding &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; more info. Omit &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt; tag to get the system &lt;span style=&quot;color: #0000ff&quot;&gt;default&lt;/span&gt; Ansi --&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;     &amp;lt;!-- Use utf-16 since it&#39;s &lt;span style=&quot;color: #0000ff&quot;&gt;default&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; logvivew4net --&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;     &amp;lt;encoding &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;utf-16&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;     &amp;lt;!-- Be careful &lt;span style=&quot;color: #0000ff&quot;&gt;where&lt;/span&gt; you send the logs, they may contain sensitive data. You can use 224.0.0.1 &lt;span style=&quot;color: #0000ff&quot;&gt;for&lt;/span&gt; the local net --&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;     &amp;lt;remoteAddress &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;127.0.0.2&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;     &amp;lt;remotePort &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;8090&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;     &amp;lt;layout type=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;log4net.Layout.PatternLayout&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;       &amp;lt;!-- You should be aware that generating type and method information &lt;span style=&quot;color: #0000ff&quot;&gt;is&lt;/span&gt; very SLOW --&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;       &amp;lt;conversionPattern &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;%date %level - %message%n%exception&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;     &amp;lt;/layout&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;   &amp;lt;/appender&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;   &amp;lt;!-- Setup the root category, add the appenders and set the &lt;span style=&quot;color: #0000ff&quot;&gt;default&lt;/span&gt; level --&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;     &amp;lt;root&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;       &amp;lt;level &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;       &amp;lt;appender-&lt;span style=&quot;color: #0000ff&quot;&gt;ref&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;ref&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;udpLogAppender&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;       &amp;lt;!--appender-&lt;span style=&quot;color: #0000ff&quot;&gt;ref&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;ref&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;RollingFileAppender&amp;quot;&lt;/span&gt; /&amp;gt;--&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;     &amp;lt;/root&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;     &amp;lt;logger name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Dropit.Extension&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;       &amp;lt;level &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;     &amp;lt;/logger&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;     &amp;lt;logger name=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Dropit.Extension.UI&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;       &amp;lt;level &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Error&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt;     &amp;lt;/logger&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt;   &amp;lt;/log4net&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&lt;/span&gt; &amp;lt;/configuration&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;2. Create a Composer function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just make a very simple Composer function with an error, the ErrorFunction, and try to cause an DivideByZeroException.&lt;/p&gt;

&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;partial&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; ErrorFunction : BaseContentFunction&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; OnLoad(EventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; x = 5;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; y = 0;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; z = x / y;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;OK, Now try to register this function and use this (drag and drop) on a Composer page and see what happens.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/link/f0fc84ba761143e0833f1baf361b8612.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/2f11d9a05bb64b419b488a627d97063c.png&quot; width=&quot;372&quot; height=&quot;85&quot; /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;And take a look at the log&lt;/p&gt;

&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; UDP8080 - 127.0.0.1 2009-11-13 16:27:47,005 ERROR - 1.2.5 Unhandled exception &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; ASP.NET&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; System.Web.HttpUnhandledException: Exception of type &lt;span style=&quot;color: #006080&quot;&gt;&#39;System.Web.HttpUnhandledException&#39;&lt;/span&gt; was thrown. ---&amp;gt; System.DivideByZeroException: Attempted to divide by zero&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;3. Common Function Error Handler&lt;/p&gt;

&lt;p&gt;Now, let catching the error by adding a try{} catch{} and using the &lt;a href=&quot;http://sdk.episerver.com/composer/html/M_Dropit_Extension_Common_Utils_CommonFunctionErrorHandler.htm&quot;&gt;CommonFunctionErrorHandler&lt;/a&gt;. &lt;/p&gt;

&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;partial&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; ErrorFunction : BaseContentFunction&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; OnLoad(EventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!IsPostBack)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;try&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; x = 5;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; y = 0;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; z = x / y;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;                 &lt;span style=&quot;color: #0000ff&quot;&gt;catch&lt;/span&gt; (DivideByZeroException ex)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;                     &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!Utils.CommonFunctionErrorHandler(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;                                &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;Invalid y value. The value cannot be zero.&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;                                ex))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;                         &lt;span style=&quot;color: #0000ff&quot;&gt;throw&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Compile, and try to drag and drop the function again. Now insteand of the standard message, we’ll get a more friendly message.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/link/2ae87e51d7104dd8b04bc4e23e626f8a.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/fa9ce69fd0aa413f948455ab776e83ce.png&quot; width=&quot;370&quot; height=&quot;65&quot; /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;and the log records the same exception message again, &lt;/p&gt;

&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
  &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; UDP8080 - 127.0.0.1 2009-11-13 16:35:27,427 ERROR - ASP.composer_functions_errorfunction_ascx: Invalid y &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;. The &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt; cannot be zero.&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; System.DivideByZeroException: Attempted to divide by zero.&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Composer Error handle level&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ok,&amp;#160; But what the CommonFunctionErrorHandler does? you may wonder. The CommonFunctionErrorHandler handles an exception in three way: Development, Test or Production.&lt;/p&gt;

&lt;p&gt;Take a look at the Composers settings in Admin-mode.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/link/8c7335c99fec415fb71800f567f1a4c4.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/ba701e258d72431a98c1657665f3d8a1.png&quot; width=&quot;384&quot; height=&quot;462&quot; /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Try to switching between these modes. Go to the view mode of the Composer page that contains the ErrorFunction we created in previous section and see what happens with our “ErrorFunction”.&lt;/p&gt;

&lt;p&gt;a. Original error message (Development): The page crashes and display the the original message of the exception.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/link/1b8cc0d06e1f4412b9444782404109dc.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/623b3570964244ac8c8fa3c495303c76.png&quot; width=&quot;383&quot; height=&quot;148&quot; /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;b. The Friendly error message (Test): Display a more friendly message so the tester can report the error and continue testing other functions on the page.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/link/abeb919fdce243359f92534581b632c6.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/336c4f07a911450293579bdd12c417ca.png&quot; width=&quot;383&quot; height=&quot;175&quot; /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;c. Hide error message (Production): This is kind of “On error resume next”. You may hide the function from end-user and let other composer function and controls on the page display as normal.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/link/c3dc2aaacfe44064b7da4b7ccb4826d6.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;/link/3757753a5b7e4e71a1bb1f261bb59607.png&quot; width=&quot;386&quot; height=&quot;185&quot; /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;That’s all and I hope that I can give you a clue how you can handle the error in Composer function. Please let me know if you have any comments or suggestions for improving this handle in Composer.&lt;/p&gt;</id><updated>2009-11-13T16:32:00.0000000Z</updated><summary type="html">Blog post</summary></entry></feed>