Improve an error message.
authorCarl Hetherington <cth@carlh.net>
Mon, 22 Oct 2012 19:25:34 +0000 (20:25 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 22 Oct 2012 19:25:34 +0000 (20:25 +0100)
src/sound_asset.cc

index 833d89dc8c233651b473a997eb2076549fefa8cf..9ec3b2f905f4258941ed51f0d95e7f077cb1722c 100644 (file)
@@ -153,7 +153,10 @@ SoundAsset::construct (sigc::slot<string, Channel> get_path)
                        }
                        
                        if (frame_buffer_channel[j].Size() != frame_buffer_channel[j].Capacity()) {
-                               throw MiscError ("short audio frame");
+                               stringstream s;
+                               s << "short audio frame; " << _channels << " channels, "
+                                 << frame_buffer_channel[j].Size() << " vs " << frame_buffer_channel[j].Capacity();
+                               throw MiscError (s.str ());
                        }
                }