public string Evaluate(TagModel model)
        {
            var tileName = GetAutoValueAsString("Template", model);

            try
            {
                LoadTile(model, tileName);
                return(_tile.Render(model) ?? String.Empty);
            }
            catch (TileExceptionWithContext)
            {
                throw;
            }
            catch (TileException)
            {
                throw;
            }
            catch (ExceptionWithContext EWC)
            {
                throw TileExceptionWithContext.ErrorInTile(tileName, EWC);
            }
            catch (Exception e)
            {
                throw TileException.ErrorInTile(tileName, e);
            }
        }
Beispiel #2
0
 public string Render(TagModel model, AttributeSet attributes)
 {
     try
     {
         using (model.Decorate().With(attributes))
         {
             return(_template.Evaluate(model));
         }
     }
     catch (TileExceptionWithContext)
     {
         throw;
     }
     catch (TileException)
     {
         throw;
     }
     catch (ExceptionWithContext EWC)
     {
         throw TileExceptionWithContext.ErrorInTile(_template.Description, EWC);
     }
     catch (Exception e)
     {
         throw TileException.ErrorInTile(_template.Description, e);
     }
 }