/[svn]/libgig/trunk/src/RIFF.cpp
ViewVC logotype

Diff of /libgig/trunk/src/RIFF.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3057 by schoenebeck, Fri Dec 16 13:05:56 2016 UTC revision 3198 by schoenebeck, Sun May 21 12:46:05 2017 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   libgig - C++ cross-platform Gigasampler format file access library    *   *   libgig - C++ cross-platform Gigasampler format file access library    *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003-2016 by Christian Schoenebeck                      *   *   Copyright (C) 2003-2017 by Christian Schoenebeck                      *
6   *                              <cuse@users.sourceforge.net>               *   *                              <cuse@users.sourceforge.net>               *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
# Line 2251  namespace RIFF { Line 2251  namespace RIFF {
2251  // *************** Exception ***************  // *************** Exception ***************
2252  // *  // *
2253    
2254        Exception::Exception() {
2255        }
2256    
2257        Exception::Exception(String format, ...) {
2258            va_list arg;
2259            va_start(arg, format);
2260            Message = assemble(format, arg);
2261            va_end(arg);
2262        }
2263    
2264        Exception::Exception(String format, va_list arg) {
2265            Message = assemble(format, arg);
2266        }
2267    
2268      void Exception::PrintMessage() {      void Exception::PrintMessage() {
2269          std::cout << "RIFF::Exception: " << Message << std::endl;          std::cout << "RIFF::Exception: " << Message << std::endl;
2270      }      }
2271    
2272        String Exception::assemble(String format, va_list arg) {
2273            char* buf = NULL;
2274            vasprintf(&buf, format.c_str(), arg);
2275            String s = buf;
2276            free(buf);
2277            return s;
2278        }
2279    
2280    
2281  // *************** functions ***************  // *************** functions ***************
2282  // *  // *

Legend:
Removed from v.3057  
changed lines
  Added in v.3198

  ViewVC Help
Powered by ViewVC