Skip to content
Snippets Groups Projects
Verified Commit 27c286f5 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman 💥
Browse files

Added more descriptive error

parent d7e6f0d4
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ module Apex
raise ArgumentError.new("callsign must be a String") if not callsign.kind_of? String
raise ArgumentError.new("ssid must be an Integer.") if (not ssid.nil?) && (not ssid.kind_of? Integer)
raise ArgumentError.new("ssid must be a value between 0 (inclusive) and 15 (inclusive): #{ssid}") if (not ssid.nil?) && (ssid < 0 || ssid > 15)
raise ArgumentError.new("ssid must be a value between 0 (inclusive) and 15 (inclusive): #{callsign}-#{ssid}") if (not ssid.nil?) && (ssid < 0 || ssid > 15)
raise ArgumentError.new("Callsign can not be an empty string") if callsign.empty?
raise ArgumentError.new("Callsign must only contain numebers and letters") if callsign.strip.match?(/[^a-zA-Z0-9]/)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment