Catch InvalidSchema exceptions on resource proxy

For wrong urls like this one:

http://beta.ckan.org/dataset/2012-global-hunger-index-data/resource/87131421-b199-493a-9a52-81c2ab11ab9b

Actual URL:

javascript:downloadFile('/FileDownload/?fileId=2323860&vdcId=90&xff=0&versionNumber=1')