From 801e7de1f85656746d832508baf4583907826420 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 23 Apr 2010 15:14:00 +0000 Subject: Minor updates to the List class, unchecked corner cases. The CsvWriter now writes csv. It understands both excel formatting and c-style, which I made up myself (it's just c-style escape sequences). Sha1 is converted to work with the CryptoHash API and it does indeed work. --- src/list.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/list.h') diff --git a/src/list.h b/src/list.h index 6d2246e..3979b63 100644 --- a/src/list.h +++ b/src/list.h @@ -871,6 +871,8 @@ namespace Bu */ value &first() { + if( core->pFirst->pValue == NULL ) + throw Bu::ExceptionBase("Attempt to read first element from empty list."); _hardCopy(); return *core->pFirst->pValue; } @@ -881,6 +883,8 @@ namespace Bu */ const value &first() const { + if( core->pFirst->pValue == NULL ) + throw Bu::ExceptionBase("Attempt to read first element from empty list."); return *core->pFirst->pValue; } -- cgit v1.2.3