﻿namespace dotless.Core
{
    using System.Web;
    using System.Web.SessionState;
    
    public class LessCssWithSessionHttpHandler : LessCssHttpHandler, IRequiresSessionState
    {
    }

    public class LessCssHttpHandler : LessCssHttpHandlerBase, IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                var handler = Container.GetInstance<HandlerImpl>();

                handler.Execute();
            }
            catch (System.IO.FileNotFoundException ex)
            {
                context.Response.StatusCode = 404;
                context.Response.Write("/* File Not Found while parsing: " + ex.Message + " */");
                context.Response.End();
            }
            catch (System.IO.IOException ex)
            {
                context.Response.StatusCode = 500;
                context.Response.Write("/* Error in less parsing: " + ex.Message + " */");
                context.Response.End();
            }
        }

        public bool IsReusable
        {
            get { return true; }
        }
    }
}

﻿namespace dotless.Core
{
    using System.Web;
    using System.Web.SessionState;
    
    public class LessCssWithSessionHttpHandler : LessCssHttpHandler, IRequiresSessionState
    {
    }

    public class LessCssHttpHandler : LessCssHttpHandlerBase, IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                var handler = Container.GetInstance<HandlerImpl>();

                handler.Execute();
            }
            catch (System.IO.FileNotFoundException ex)
            {
                context.Response.StatusCode = 404;
                if (context.Request.IsLocal)
                {
                    context.Response.Write("/* File Not Found while parsing: " + ex.Message + " */");
                }
                else
                {
                    context.Response.Write("/* Error Occurred. Consult log or view on local machine. */");
                }
                context.Response.End();
            }
            catch (System.IO.IOException ex)
            {
                context.Response.StatusCode = 500;
                if (context.Request.IsLocal)
                {
                    context.Response.Write("/* Error in less parsing: " + ex.Message + " */");
                }
                else
                {
                    context.Response.Write("/* Error Occurred. Consult log or view on local machine. */");
                }
                context.Response.End();
            }
        }

        public bool IsReusable
        {
            get { return true; }
        }
    }
}

Remove error message giving away path location if not accessing from the local machine
Remove error message giving away path location if not accessing from the local machine
