/[pcsx2_0.9.7]/trunk/common/include/Utilities/SafeArray.inl
ViewVC logotype

Diff of /trunk/common/include/Utilities/SafeArray.inl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/common/include/Utilities/SafeArray.inl	2010/12/23 11:48:33	279
+++ trunk/common/include/Utilities/SafeArray.inl	2010/12/23 12:02:12	280
@@ -31,7 +31,8 @@
 	m_size		= initSize;
 
 	if( m_ptr == NULL )
-		throw Exception::OutOfMemory(name + wxsFormat(L" (SafeArray::constructor) [size=%d]", initSize));
+		throw Exception::OutOfMemory(name)
+			.SetDiagMsg(wxsFormat(L"Called from 'SafeArray::ctor' [size=%d]", initSize));
 }
 
 template< typename T >
@@ -79,7 +80,8 @@
 	m_size		= initialSize;
 
 	if( (initialSize != 0) && (m_ptr == NULL) )
-		throw Exception::OutOfMemory(name + wxsFormat(L" (SafeArray::constructor) [size=%d]", initialSize));
+		throw Exception::OutOfMemory(name)
+			.SetDiagMsg(wxsFormat(L"Called from 'SafeArray::ctor' [size=%d]", initialSize));
 }
 
 // Clears the contents of the array to zero, and frees all memory allocations.
@@ -106,9 +108,8 @@
 
 	m_ptr = _virtual_realloc( newsize );
 	if( m_ptr == NULL )
-		throw Exception::OutOfMemory(Name +
-			wxsFormat(L" (SafeArray::ExactAlloc) [oldsize=%d] [newsize=%d]", m_size, newsize)
-		);
+		throw Exception::OutOfMemory(Name)
+			.SetDiagMsg(wxsFormat(L"Called from 'SafeArray::ExactAlloc' [oldsize=%d] [newsize=%d]", m_size, newsize));
 
 	m_size = newsize;
 }
@@ -199,9 +200,8 @@
 	m_ptr		= (T*)malloc( initialSize * sizeof(T) );
 
 	if( m_ptr == NULL )
-		throw Exception::OutOfMemory(Name +
-			wxsFormat(L" (SafeList::Constructor) [length=%d]", m_length)
-		);
+		throw Exception::OutOfMemory(Name)
+			.SetDiagMsg(wxsFormat(L"called from 'SafeList::ctor' [length=%d]", m_length));
 
 	for( int i=0; i<m_allocsize; ++i )
 	{
@@ -227,9 +227,8 @@
 		const int newalloc = blockSize + ChunkSize;
 		m_ptr = _virtual_realloc( newalloc );
 		if( m_ptr == NULL )
-			throw Exception::OutOfMemory(Name +
-				wxsFormat(L" (SafeList::MakeRoomFor) [oldlen=%d] [newlen=%d]", m_length, blockSize)
-			);
+			throw Exception::OutOfMemory(Name)
+				.SetDiagMsg(wxsFormat(L"Called from 'SafeList::MakeRoomFor' [oldlen=%d] [newlen=%d]", m_length, blockSize));
 
 		for( ; m_allocsize<newalloc; ++m_allocsize )
 		{

 

  ViewVC Help
Powered by ViewVC 1.1.22