Debugging showed me that the problem was that mSessionData is null so therefore mSessionData.sLatestErr doesnt work. To tackle this I created a new instance of SessionData on each page, i.e.:
Code:
public SessionData mSessionData = new SessionData();
I also gave sLatestError a test value. Now in my SessionData class I received a different error: StackOverFlowException! This is present here:

Code:
 public ErrorPage errorPage = new ErrorPage();
In other words the ErrorPage is stuck in some loop, presumably endlessly creating new instances of itself.I havent been able to figure out why since the ErrorPage seems fine to me but I have realized another problem! At the moment every page creates a new instance of ErrorPage. Doesnt this mean that every page automatically loads ErrorPage.aspx even if there is no error??