1 /*
2 * mp3plot - Bitrate analysis tool
3 *
4 * Copyright (C) 2007, 2009 Toni Corvera
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 // $Id: element.cc 1091 2009-04-01 20:22:06Z $
22
23 #include "element.h"
24
25 namespace mp3plot {
26
27 namespace mp3 {
28
29 // -- MP3 Element -- (Common code of tags and frames)
30
check(const std::ifstream & in,const std::string & failed_on)31 void element::check(const std::ifstream & in, const std::string & failed_on)
32 throw (e_read_failure)
33 {
34 if (!in.good()) {
35 throw e_read_failure("Failed to read " + failed_on, EX_IOERR);
36 }
37 }
38
39 } // namespace mp3
40
41 } // namespace mp3plot
42
43 // vim:set ts=4 et ai:
44
45