Simple Error Checking Class

Im very new to PHP, programming and OOP in general, but here is a small errorHandling class that will allow your to set errors in an array and either retrieve a single error by $key or return the whole array.

If there is any security holes do let me know.