Kodi Community Forum
Error handling? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Scrapers (https://forum.kodi.tv/forumdisplay.php?fid=60)
+--- Thread: Error handling? (/showthread.php?tid=53439)



Error handling? - ultrabrutal - 2009-06-24

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?


- spiff - 2009-06-24

uhm, error handling is uhrr, nonexistent Smile

it *should* error out if empty xml is returned, but it won't necessarily give ui feedback


- ultrabrutal - 2009-06-24

that was what I was afraid of Smile

consider this a feature request then Wink


- ultrabrutal - 2009-06-24

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?


- ultrabrutal - 2009-06-26

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?