# Catching errors on my Loader?

**URL:** <https://forum.kirupa.com/t/catching-errors-on-my-loader/279792>\
**Category:** flash\
**Created:** [January 19, 2009, 12:54pm UTC](https://forum.kirupa.com/t/catching-errors-on-my-loader/279792 "2009-01-19T12:54:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hexagon06](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@hexagon06](https://forum.kirupa.com/u/hexagon06)\
**Post date:** [January 19, 2009, 12:54pm UTC](https://forum.kirupa.com/t/catching-errors-on-my-loader/279792/1 "2009-01-19T12:54:40Z")

</div>

Hello,

I’m using a loader on a portfolio website I’m making. I use it to load Images and put them in the displaylist etc.

the loader works perfectly, but I want to catch the error for if the URL isn’t correct.

I’ve got this:

```auto
try{
    _loader.load(_location);
} catch(error:IOErrorEvent) {
    trace("IOErrorEvent catch: " + error);
} catch(error:TypeError) {
    trace("TypeError catch: " + error);
} catch(error:Error) {
    trace("Error catch: " + error);
} finally {
    trace("Finally!");
}

```

\_location is the URL, tested and works fine if the url is correct, but if not the error comes ugly anyway, it isn’t ‘cought’.

anyone know how to fix it?
