-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathErrors.cs
More file actions
42 lines (40 loc) · 1.24 KB
/
Errors.cs
File metadata and controls
42 lines (40 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RPGNet
{
class Errors
{
public static void throwError(String Message)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(Message);
Console.WriteLine("Compiling terminated.");
Console.ReadLine();
Environment.Exit(1);
}
public static void throwNotice(String Message)
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine(Message);
}
public static void showInfo(String Message)
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine(Message);
}
public static void showDefinedNotice(String ID)
{
switch (ID)
{
case "spacing":
Errors.showInfo("This can be caused by spaces within quotes. For example:");
Errors.showInfo("%Scan(' ':String) will crash within a program. Instead: ");
Errors.showInfo("%Scan('$s':String) will fix this problem.");
break;
}
}
}
}