PageRenderTime 55ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 0ms

/Classes/UseXBMCScrapers/Exceptions.vb

#
Visual Basic | 103 lines | 65 code | 26 blank | 12 comment | 1 complexity | df2b0e581021f94a72f00c0b68c77c41 MD5 | raw file
Possible License(s): GPL-2.0
  1. ' XScraperLib - .NET library for accessing XBMC-style metadata scrapers.
  2. ' Copyright (C) 2010 John Klimek
  3. ' This program is free software: you can redistribute it and/or modify
  4. ' it under the terms of the GNU General Public License as published by
  5. ' the Free Software Foundation, either version 3 of the License, or
  6. ' any later version.
  7. ' This program is distributed in the hope that it will be useful,
  8. ' but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ' GNU General Public License for more details.
  11. ' You should have received a copy of the GNU General Public License
  12. ' along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. Public Class RequiredAddonNotFound
  14. Inherits System.Exception
  15. Private mScraperID As String
  16. Public ReadOnly Property ScraperID() As String
  17. Get
  18. Return mScraperID
  19. End Get
  20. End Property
  21. Sub New(ByVal scraperID As String)
  22. MyBase.New("Required addon not found: " + scraperID)
  23. mScraperID = scraperID
  24. End Sub
  25. End Class
  26. Public Class FunctionNotFound
  27. Inherits System.Exception
  28. Private mFunctionName As String
  29. Public ReadOnly Property FunctionName() As String
  30. Get
  31. Return mFunctionName
  32. End Get
  33. End Property
  34. Sub New(ByVal functionName As String)
  35. MyBase.New("Function not found: " + functionName)
  36. mFunctionName = functionName
  37. End Sub
  38. End Class
  39. Public Class FullXmlTreeNotBuilt
  40. Inherits System.Exception
  41. Sub New()
  42. MyBase.New("Full XML tree is not built. You must call BuildXmlWithRequiredAddons().")
  43. End Sub
  44. End Class
  45. Public Class OuterChainElementIncorrect
  46. Inherits System.Exception
  47. Private mOuterChainElement As String
  48. Public ReadOnly Property OuterChainElement() As String
  49. Get
  50. Return mOuterChainElement
  51. End Get
  52. End Property
  53. Sub New(ByVal outerChainElement As String)
  54. MyBase.New("Chain functions are expected to return a <details> tag but the outer tag was: " + outerChainElement)
  55. mOuterChainElement = outerChainElement
  56. End Sub
  57. End Class
  58. Public Class InvalidScraperSettingValue
  59. Inherits System.Exception
  60. Private mScraperSetting As ScraperSettingEnum
  61. Private mScraperSettingValue As String
  62. Public ReadOnly Property ScraperSettingValue() As String
  63. Get
  64. Return mScraperSettingValue
  65. End Get
  66. End Property
  67. Public ReadOnly Property ScraperSetting() As ScraperSettingEnum
  68. Get
  69. Return mScraperSetting
  70. End Get
  71. End Property
  72. Sub New(ByVal scraperSetting As ScraperSettingEnum, ByVal scraperSettingValue As String)
  73. MyBase.New("Value (" + scraperSettingValue + ") is not valid for scraper setting: " + scraperSetting.ID)
  74. mScraperSetting = scraperSetting
  75. mScraperSettingValue = scraperSettingValue
  76. End Sub
  77. End Class