From 1fe9c1a4e6d12677768f2d09b97567814d944f10 Mon Sep 17 00:00:00 2001 From: niten Date: Mon, 30 Jan 2023 12:10:56 -0800 Subject: [PATCH] Define error method --- dns-client.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dns-client.rb b/dns-client.rb index adb75c6..1e682ac 100644 --- a/dns-client.rb +++ b/dns-client.rb @@ -59,6 +59,11 @@ raise 'at least one of -4 or -6 required' unless options[:ipv4] || options[:ipv6 password = options[:pw_file] raise "file does not exist or is not readable: #{password}" unless File::readable?(password) +def error(msg) + puts msg + raise msg +end + # XMPP client for Fudo Backplane class XMPPClient def initialize(domain, hostname, server, password)