From 15987345134793d3f6f0618bdf6b45ffc6609c0c Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Tue, 9 Nov 2010 19:26:40 -0800 Subject: Example of how to fix throw crashes --- gnuradio-core/src/guile/tests/general_ctors.test | 3 ++- gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'gnuradio-core') diff --git a/gnuradio-core/src/guile/tests/general_ctors.test b/gnuradio-core/src/guile/tests/general_ctors.test index 10ee9e9e8..0580d6382 100644 --- a/gnuradio-core/src/guile/tests/general_ctors.test +++ b/gnuradio-core/src/guile/tests/general_ctors.test @@ -55,7 +55,8 @@ (pass-if (true? (gr:agc-ff 0 0 0 0))) ;;; ./general/gr_align_on_samplenumbers_ss.h -;; (pass-if (true? (gr:align-on-samplenumbers-ss 0 0))) FIXME: throws +(pass-if (true? (gr:align-on-samplenumbers-ss 2 128))) +(pass-if-throw "confirm throw gr:align-on-samplenumbers-ss" #t (true? (gr:align-on-samplenumbers-ss 0 0))) ;;; ./general/gr_bin_statistics_f.h ;; (pass-if (true? (gr:bin-statistics-f 0 0 0 0 0))) FIXME: not found diff --git a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i index 841613ca6..ea73dd46d 100644 --- a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i +++ b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i @@ -22,7 +22,8 @@ GR_SWIG_BLOCK_MAGIC(gr,align_on_samplenumbers_ss); -gr_align_on_samplenumbers_ss_sptr gr_make_align_on_samplenumbers_ss(int nchan=2, int align_interval=128); +gr_align_on_samplenumbers_ss_sptr +gr_make_align_on_samplenumbers_ss(int nchan=2, int align_interval=128) throw (std::exception); class gr_align_on_samplenumbers_ss : public gr_block { -- cgit