source: binary-improvements2/CommandExtensions/src/Commands/Exception.cs@ 397

Last change on this file since 397 was 391, checked in by alloc, 2 years ago

Major refactoring/cleanup

File size: 648 bytes
Line 
1using System;
2using System.Collections.Generic;
3using JetBrains.Annotations;
4
5namespace CommandExtensions.Commands {
6 [UsedImplicitly]
7 public class ConsoleCmdException : ConsoleCmdAbstract {
8 public 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 public override string GetDescription () {
22 return "Throw an exception / log messages";
23 }
24 }
25}
Note: See TracBrowser for help on using the repository browser.