Sha256: 07f1eb17b711c80170416ff57ccba9731e605c603097ce1879ca89dd848e695e
Contents?: true
Size: 615 Bytes
Versions: 24
Compression:
Stored size: 615 Bytes
Contents
class Wx::XmlResource # The standard .load method returns a boolean indicating success or # failure. Failure might result from bad XML, or a non-existent # file. In ruby, in these circumstances, it's more natural to raise an # Exception than expect the user to test the return value. wx_load = self.instance_method(:load) define_method(:load) do | fname | result = wx_load.bind(self).call(fname) if not result Kernel.raise( RuntimeError, "Failed to load XRC from '#{fname}'; " + "check the file exists and is valid XML") end fname end end
Version data entries
24 entries across 24 versions & 1 rubygems