<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Exceptions and Logging</title><link>https://community.telligent.com/community/11/w/developer-training/65097/exceptions-and-logging</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>Exceptions and Logging</title><link>https://community.telligent.com/community/11/w/developer-training/65097/exceptions-and-logging</link><pubDate>Tue, 04 Aug 2020 19:33:36 GMT</pubDate><guid isPermaLink="false">77f3aed4-7c79-4115-aeb3-118af8430d24</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65097/exceptions-and-logging#comments</comments><description>Current Revision posted to Developer Training by Former Member on 08/04/2020 19:33:36&lt;br /&gt;
&lt;p&gt;When developing code-based customizations using Verint Community, it is important to manage exceptions and process logging appropriately. Verint Community provides services to enable effective user notification and logging of exceptions and also general process logging.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Why_do_I_Need_to_Handle_Exceptions_Logging_in_a_Specific_Way" name="Why_do_I_Need_to_Handle_Exceptions_Logging_in_a_Specific_Way"&gt;&lt;/a&gt;Why do I Need to Handle Exceptions/Logging in a Specific Way?&lt;/h2&gt;
&lt;p&gt;[[Plugins]] are .net classes and can throw&amp;nbsp;.net exceptions to identify exceptional issues and there are many solutions to process logging. Verint Community provides support for integrating exception handling and process logging, enabling a consistent error and process handling experience for administrators and community members.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Exception_Rendering" name="Exception_Rendering"&gt;&lt;/a&gt;Exception Rendering&lt;/h2&gt;
&lt;p&gt;When an exception bubbles up from a plugin to a user, either via UI rendering or&amp;nbsp;when handling a REST request, Verint Community will interpret the exception to return an error response to the accessing user. To prevent information disclosure security vulnerabilities, exceptions, by default, are replaced with a generic error message in UI and REST responses.&lt;/p&gt;
&lt;p&gt;To enable custom messages to be returned, the thrown exception must implement [[api-documentation:IUserRenderableException Provider Type|IUserRenderableException]]. This interface can be applied to a custom &lt;code&gt;Exception&lt;/code&gt; implementation to identify to Verint Community that the exception can provide an appropriate, safe, and ideally translated message&amp;nbsp;to a user. The interface defines one member, &lt;code&gt;GetUserRenderableMessage()&lt;/code&gt; which returns a string. The results of this method will be returned through the UI and shown to the user or be placed in the &lt;code&gt;Errors&lt;/code&gt; collection of [[REST API|REST]] responses (depending on how the API, and indirectly the plugin, was accessed).&lt;/p&gt;
&lt;h2&gt;&lt;a id="Exception_Logging" name="Exception_Logging"&gt;&lt;/a&gt;Exception Logging&lt;/h2&gt;
&lt;p&gt;Some exceptions are caused by user error, for example, entering &amp;quot;abcd&amp;quot; where a number was expected. Other exceptions may identify a configuration issue. Issues that occur that should be reviewed and corrected are good candidates for logging.&lt;/p&gt;
&lt;p&gt;Verint Community includes an exception log (available in &lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;) and custom exceptions can be logged there as well by implementing [[api-documentation:ILoggableException Provider Type|ILoggableException]] on the &lt;code&gt;Exception&lt;/code&gt; being thrown. Any exception that bubbles up to the end-user is reviewed by Verint Community to see if it implements &lt;code&gt;ILoggableException&lt;/code&gt;. If it does, the exception is added to the platform&amp;#39;s exception log.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ILoggableException&lt;/code&gt; requires only a single member to be implemented: &lt;code&gt;Category&lt;/code&gt;. The string returned by &lt;code&gt;Category&lt;/code&gt; is used within the exception log UI to categorize and filter the list of exceptions in the log.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Process_Logging" name="Process_Logging"&gt;&lt;/a&gt;Process Logging&lt;/h2&gt;
&lt;p&gt;Sometimes its useful for background processes to log process details not related to exceptions. In this case, plugins can use the [[api-documentation:eventlog in process api service|EventLog API]]. The event logs API enables plugins to write logging data to the Verint Community event log (available in &lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Events&lt;/strong&gt;). To write an event log entry, use the &lt;code&gt;Write&lt;/code&gt; method.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Exceptions and Logging</title><link>https://community.telligent.com/community/11/w/developer-training/65097/exceptions-and-logging/revision/2</link><pubDate>Tue, 04 Aug 2020 19:33:06 GMT</pubDate><guid isPermaLink="false">77f3aed4-7c79-4115-aeb3-118af8430d24</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65097/exceptions-and-logging#comments</comments><description>Revision 2 posted to Developer Training by Former Member on 08/04/2020 19:33:06&lt;br /&gt;
&lt;p&gt;When developing code-based customizations using Telligent Community, it is important to manage exceptions and process logging appropriately. Telligent Community provides services to enable effective user notification and logging of exceptions and also general process logging.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Why_do_I_Need_to_Handle_Exceptions_Logging_in_a_Specific_Way" name="Why_do_I_Need_to_Handle_Exceptions_Logging_in_a_Specific_Way"&gt;&lt;/a&gt;Why do I Need to Handle Exceptions/Logging in a Specific Way?&lt;/h2&gt;
&lt;p&gt;[[Plugins]] are .net classes and can throw&amp;nbsp;.net exceptions to identify exceptional issues and there are many solutions to process logging. Telligent Community provides support for integrating exception handling and process logging, enabling a consistent error and process handling experience for administrators and community members.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Exception_Rendering" name="Exception_Rendering"&gt;&lt;/a&gt;Exception Rendering&lt;/h2&gt;
&lt;p&gt;When an exception bubbles up from a plugin to a user, either via UI rendering or&amp;nbsp;when handling a REST request, Telligent Community will interpret the exception to return an error response to the accessing user. To prevent information disclosure security vulnerabilities, exceptions, by default, are replaced with a generic error message in UI and REST responses.&lt;/p&gt;
&lt;p&gt;To enable custom messages to be returned, the thrown exception must implement [[api-documentation:IUserRenderableException Provider Type|IUserRenderableException]]. This interface can be applied to a custom &lt;code&gt;Exception&lt;/code&gt; implementation to identify to Telligent Community that the exception can provide an appropriate, safe, and ideally translated message&amp;nbsp;to a user. The interface defines one member, &lt;code&gt;GetUserRenderableMessage()&lt;/code&gt; which returns a string. The results of this method will be returned through the UI and shown to the user or be placed in the &lt;code&gt;Errors&lt;/code&gt; collection of [[REST API|REST]] responses (depending on how the API, and indirectly the plugin, was accessed).&lt;/p&gt;
&lt;h2&gt;&lt;a id="Exception_Logging" name="Exception_Logging"&gt;&lt;/a&gt;Exception Logging&lt;/h2&gt;
&lt;p&gt;Some exceptions are caused by user error, for example, entering &amp;quot;abcd&amp;quot; where a number was expected. Other exceptions may identify a configuration issue. Issues that occur that should be reviewed and corrected are good candidates for logging.&lt;/p&gt;
&lt;p&gt;Telligent Community includes an exception log (available in &lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;) and custom exceptions can be logged there as well by implementing [[api-documentation:ILoggableException Provider Type|ILoggableException]] on the &lt;code&gt;Exception&lt;/code&gt; being thrown. Any exception that bubbles up to the end-user is reviewed by Telligent Community to see if it implements &lt;code&gt;ILoggableException&lt;/code&gt;. If it does, the exception is added to the platform&amp;#39;s exception log.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ILoggableException&lt;/code&gt; requires only a single member to be implemented: &lt;code&gt;Category&lt;/code&gt;. The string returned by &lt;code&gt;Category&lt;/code&gt; is used within the exception log UI to categorize and filter the list of exceptions in the log.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Process_Logging" name="Process_Logging"&gt;&lt;/a&gt;Process Logging&lt;/h2&gt;
&lt;p&gt;Sometimes its useful for background processes to log process details not related to exceptions. In this case, plugins can use the [[api-documentation:eventlog in process api service|EventLog API]]. The event logs API enables plugins to write logging data to the Telligent Community event log (available in &lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Events&lt;/strong&gt;). To write an event log entry, use the &lt;code&gt;Write&lt;/code&gt; method.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Exceptions and Logging</title><link>https://community.telligent.com/community/11/w/developer-training/65097/exceptions-and-logging/revision/1</link><pubDate>Thu, 13 Jun 2019 19:28:18 GMT</pubDate><guid isPermaLink="false">77f3aed4-7c79-4115-aeb3-118af8430d24</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65097/exceptions-and-logging#comments</comments><description>Revision 1 posted to Developer Training by Ben Tiedt on 06/13/2019 19:28:18&lt;br /&gt;
&lt;p&gt;When developing code-based customizations using Telligent Community, it is important to manage exceptions and process logging appropriately. Telligent Community provides services to enable effective user notification and logging of exceptions and also general process logging.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Why_do_I_Need_to_Handle_Exceptions_Logging_in_a_Specific_Way" name="Why_do_I_Need_to_Handle_Exceptions_Logging_in_a_Specific_Way"&gt;&lt;/a&gt;Why do I Need to Handle Exceptions/Logging in a Specific Way?&lt;/h2&gt;
&lt;p&gt;[[Plugins]] are .net classes and can throw&amp;nbsp;.net exceptions to identify exceptional issues and there are many solutions to process logging. Telligent Community provides support for integrating exception handling and process logging, enabling a consistent error and process handling experience for administrators and community members.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Exception_Rendering" name="Exception_Rendering"&gt;&lt;/a&gt;Exception Rendering&lt;/h2&gt;
&lt;p&gt;When an exception bubbles up from a plugin to a user, either via UI rendering or&amp;nbsp;when handling a REST request, Telligent Community will interpret the exception to return an error response to the accessing user. To prevent information disclosure security vulnerabilities, exceptions, by default, are replaced with a generic error message in UI and REST responses.&lt;/p&gt;
&lt;p&gt;To enable custom messages to be returned, the thrown exception must implement [[api-documentation:IUserRenderableException Provider Type|IUserRenderableException]]. This interface can be applied to a custom &lt;code&gt;Exception&lt;/code&gt; implementation to identify to Telligent Community that the exception can provide an appropriate, safe, and ideally translated message&amp;nbsp;to a user. The interface defines one member, &lt;code&gt;GetUserRenderableMessage()&lt;/code&gt; which returns a string. The results of this method will be returned through the UI and shown to the user or be placed in the &lt;code&gt;Errors&lt;/code&gt; collection of [[REST API|REST]] responses (depending on how the API, and indirectly the plugin, was accessed).&lt;/p&gt;
&lt;h2&gt;&lt;a id="Exception_Logging" name="Exception_Logging"&gt;&lt;/a&gt;Exception Logging&lt;/h2&gt;
&lt;p&gt;Some exceptions are caused by user error, for example, entering &amp;quot;abcd&amp;quot; where a number was expected. Other exceptions may identify a configuration issue. Issues that occur that should be reviewed and corrected are good candidates for logging.&lt;/p&gt;
&lt;p&gt;Telligent Community includes an exception log (available in &lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;) and custom exceptions can be logged there as well by implementing [[api-documentation:ILoggableException Provider Type|ILoggableException]] on the &lt;code&gt;Exception&lt;/code&gt; being thrown. Any exception that bubbles up to the end-user is reviewed by Telligent Community to see if it implements &lt;code&gt;ILoggableException&lt;/code&gt;. If it does, the exception is added to the platform&amp;#39;s exception log.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ILoggableException&lt;/code&gt; requires only a single member to be implemented: &lt;code&gt;Category&lt;/code&gt;. The string returned by &lt;code&gt;Category&lt;/code&gt; is used within the exception log UI to categorize and filter the list of exceptions in the log.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Process_Logging" name="Process_Logging"&gt;&lt;/a&gt;Process Logging&lt;/h2&gt;
&lt;p&gt;Sometimes its useful for background processes to log process details not related to exceptions. In this case, plugins can use the [[api-documentation:eventlogs in process api service|Eventlogs API]]. The event logs API enables plugins to write logging data to the Telligent Community event log (available in &lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Events&lt;/strong&gt;). To write an event log entry, use the &lt;code&gt;Write&lt;/code&gt; method.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>