﻿/*
'*********************************************************************************
'   ©2007 CamSoft Data Systems, Inc. (www.camsoftdata.com)
'---------------------------------------------------------------------------------
'   FILE NAME:      Utility.js
'   DESCRIPTION:    Javascript utility functions that support the map 
'---------------------------------------------------------------------------------
'   MODIFICATIONS/NOTES:
'   NAME                DATE            DESCRIPTION
'   Wayne Losavio       07/12/2007      initial development
'*********************************************************************************
*/
var Utility = {
    /// <summary>
    ///   static Utility class
    /// </summary>

    OnFailed: function(error) {
        /// <summary>
        ///     This is the failed callback function for all webservices.
        /// </summary>  
        /// <param name="error">The error object from the webservice</param>          
        
        var stackTrace = error.get_stackTrace();
        var message = error.get_message();
        var statusCode = error.get_statusCode();
        var exceptionType = error.get_exceptionType();
        var timedout = error.get_timedOut();
       
        // Display the error.    
        var RsltElem = 
            "Stack Trace: " +  stackTrace + "<br/>" +
            "Service Error: " + message + "<br/>" +
            "Status Code: " + statusCode + "<br/>" +
            "Exception Type: " + exceptionType + "<br/>" +
            "Timedout: " + timedout;
            
            alert(RsltElem);
    }
}

if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();

