summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/band.rb2
-rw-r--r--lib/registration.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/band.rb b/lib/band.rb
index a951059..efccc5f 100644
--- a/lib/band.rb
+++ b/lib/band.rb
@@ -4,7 +4,7 @@ require_relative 'song'
class Band
attr_reader :name, :city, :website, :label, :short_bio, :contact, :members, :songs
- attr_reader :errors
+ attr_accessor :errors
def initialize(params = nil)
@errors = []
diff --git a/lib/registration.rb b/lib/registration.rb
index e38f0fe..6afe8b6 100644
--- a/lib/registration.rb
+++ b/lib/registration.rb
@@ -14,6 +14,8 @@ def send_registration_emails_for(band, pdf_url)
mail.delivery_method :smtp, :address => settings.smtp['address'], :port => settings.smtp['port']
end
mail.deliver!
+rescue Net::SMTPError => e
+ band.errors << e.message
end
def generate_pdf_for(band, filename)