From a08d13830933cb241b4dc1c2426116a4c1c9cbee Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Mon, 28 Jan 2008 17:26:37 +0000 Subject: [PATCH] * If throwing InvalidSize, at least print out why --- src/FFT.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/FFT.cpp b/src/FFT.cpp index a252c69..f1040bd 100644 --- a/src/FFT.cpp +++ b/src/FFT.cpp @@ -741,8 +741,11 @@ FFT::m_method = -1; FFT::FFT(unsigned int size) { - if (size < 2) throw InvalidSize; - if (size & (size-1)) throw InvalidSize; + if ((size < 2) || + (size & (size-1))) { + std::cerr << "FFT::FFT(" << size << "): power-of-two sizes only supported, minimum size 2" << std::endl; + throw InvalidSize; + } if (m_method == -1) { m_method = 1;