diff --git a/lib/webvtt.rb b/lib/webvtt.rb index f8c6c63..9a991ac 100644 --- a/lib/webvtt.rb +++ b/lib/webvtt.rb @@ -3,6 +3,7 @@ module Webvtt # Your code goes here... + class MalformedError < StandardError; end end require 'webvtt/file' diff --git a/lib/webvtt/file.rb b/lib/webvtt/file.rb index 10706b1..545e4e5 100644 --- a/lib/webvtt/file.rb +++ b/lib/webvtt/file.rb @@ -25,7 +25,7 @@ def initialize(input_file) def parse remove_bom if !webvtt_line?(file.lines.first) - raise Webvtt::MalformedError + raise Webvtt::MalformedError, "Invalid WebVTT file format" end in_header = true collected_lines = []