newerrorlocation function

Generate new errorlocation object