Error handling?
#1
If for example a call to a function in the scraper fails (login error, server offline etc). How do I show this to the user.
I've tried to do a hack where I write the error as a result from GetSearchResults (login error), but it does not show in XBMC - only in the ScraperXML tester.

Spiff, how do I go about this?
Reply
#2
uhm, error handling is uhrr, nonexistent Smile

it *should* error out if empty xml is returned, but it won't necessarily give ui feedback
Reply
#3
that was what I was afraid of Smile

consider this a feature request then Wink
Reply
#4
This is my fake error handling for login errors:

Code:
<RegExp input="$$3" output="&lt;results&gt;\1&lt;/results&gt;" dest="8"><RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;Error returned from server&lt;/title&gt;&lt;id&gt;123456789&lt;/id&gt;&lt;url&gt;NA&lt;/url&gt;&lt;/entity&gt;&lt;entity&gt;&lt;title&gt;\1&lt;/title&gt;&lt;id&gt;987654321&lt;/id&gt;&lt;url&gt;NA&lt;/url&gt;&lt;/entity&gt;" dest="3"><expression repeat="no">&lt;response status="failed"&gt;(.*?)&lt;/response&gt;</expression></RegExp><expression noclean="1" /></RegExp>

ScraperXML test: shows this result from my scraper when invalid login:

Code:
<results>
  <entity>
    <title>Error returned from server</title>
    <id>123456789</id>
    <url>NA</url>
  </entity>
  <entity>
    <title>UserName and Password not supplied</title>
    <id>987654321</id>
    <url>NA</url>
  </entity>
</results>

However this is not displayed in XBMC. Any idea why not?
Reply
#5
No one has an idea? Sad

Ok, in that case... Spiff, where would be a good point to set a break point in the source as it must be a bug?
Reply

Logout Mark Read Team Forum Stats Members Help
Error handling?0