Ejemplo n.º 1
0
        public static string OopsTemplate(Exception ex)
        {
            string error = null;

            if (JintAddons.debug)
            {
                error = ex.Message + " --> " + ex.StackTrace;
            }
            return(ServerHelpers.GetAssemblyTemplate("OopsTemplate.mustache", new { error }));
        }
Ejemplo n.º 2
0
 public static string DDTemplate(object json)
 {
     if (!JintAddons.debug)
     {
         json = new
         {
             error   = "Wrong mode",
             message = "Debug mode must be on"
         };
     }
     return(ServerHelpers.GetAssemblyTemplate("DD.mustache", JsonConvert.SerializeObject(json)));
 }
Ejemplo n.º 3
0
 public static string NoFoundTemplate(string route)
 {
     return(ServerHelpers.GetAssemblyTemplate("404.mustache", new { route }));
 }