Unknown Identifier: 'Exception'?

I have a boo method which takes in two lists. If the lists are of unequal length, I want to raise an exception. Here’s what I have:

def connectSockets(socket1 as List[of int], socket2 as List[of int]):
    if socket1.Count != socket2.Count:
        raise Exception("Socket mismatch!")

Unity is giving me an error on this line though:

Unknown identifier: 'Exception'

Looking in the documentation though, namely right here: http://docs.unity3d.com/412/Documentation/ScriptReference/PlayerPrefsException.html

I can clearly see that it says this class is a descendant of Exception. So why isn’t Unity recognizing the class?

System.Exception :wink: