Exception handling

using System;

//any method can throw an error
void MethodWithException() {
    throw new Exception("test exception");
}