source: TFP-WebServer/CommandExtensions/src/Commands/Exception.cs@ 460

Last change on this file since 460 was 405, checked in by alloc, 21 months ago

Refactored console commands for A21 caching

File size: 654 bytes
Line 
1using System;
2using System.Collections.Generic;
3using JetBrains.Annotations;
4
5namespace CommandExtensions.Commands {
6 [UsedImplicitly]
7 public class ConsoleCmdException : ConsoleCmdAbstract {
8 protected override string[] getCommands () {
9 return new[] { "exception" };
10 }
11
12 public override bool AllowedInMainMenu => true;
13
14 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
15 Log.Out ("Test info");
16 Log.Warning ("Test warning");
17 Log.Error ("Test error");
18 throw new Exception ("Test exception");
19 }
20
21 protected override string getDescription () {
22 return "Throw an exception / log messages";
23 }
24 }
25}
Note: See TracBrowser for help on using the repository browser.