aboutsummaryrefslogtreecommitdiffstats
path: root/host/test
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-25 22:05:50 -0700
committerJosh Blum <josh@joshknows.com>2010-04-25 22:05:50 -0700
commit61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688 (patch)
tree12cfaf308bcbd779dd5a1254b12a6104088629cc /host/test
parentd1d6c859f0dbae5f044519d589d5ad3fcbb8643e (diff)
downloaduhd-61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688.tar.gz
uhd-61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688.tar.bz2
uhd-61ec6711bb4bbae7a8a26cc631eeb88fb3e7d688.zip
Work on exceptions.
Added props exception macro to make the set/get prop switch statements easier. Made use of boost throw exception macro for throw-site information in throw assert.
Diffstat (limited to 'host/test')
-rw-r--r--host/test/gain_handler_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/test/gain_handler_test.cpp b/host/test/gain_handler_test.cpp
index bf2ec5db7..0669b491a 100644
--- a/host/test/gain_handler_test.cpp
+++ b/host/test/gain_handler_test.cpp
@@ -72,6 +72,8 @@ private:
case PROP_GAIN_NAMES:
val = _gain_values.keys();
return;
+
+ default: UHD_THROW_PROP_WRITE_ONLY();
}
}
@@ -87,9 +89,7 @@ private:
_gain_values[name] = val.as<float>();
return;
- case PROP_GAIN_RANGE:
- case PROP_GAIN_NAMES:
- throw std::runtime_error("cannot set this property");
+ default: UHD_THROW_PROP_READ_ONLY();
}
}