I have this code that creates a custom exception class which has private data members of type const char*. I want to delete those pointers in the destructor, but since the exception is thrown inside the Price object's code, the destructor seems to be getting called before catch block in the main function. I'm new to this, so if anyone could point me in the right direction, I'd really appreciate it.

Code:
//CCException.h
#pragma once
#include <iostream>
using namespace std;

class CCException
{
public:
	CCException(const char* m, const char* f);
	~CCException(void);
	void PrintMessage() const;
private:
	 const char* message;
	 const char* function;
};
Code:
//CCException.cpp
#include "CCException.h"


CCException::CCException(const char* m, const char* f)
{
	message = m;
	function = f;
}


CCException::~CCException(void)
{
	//delete [] message;
	//message = NULL;
}

void CCException::PrintMessage() const
{
	cout <<"Error in "<< function << ": " << message << endl;
}
Code:
//price.h
#pragma once
#include "CCException.h"

class Price
{
public:
	const enum Term {Short, Medium, Long};
	Price(const int &n);
	~Price(void);
	const double getPrice(const int &i) const;
	void setPrice(const double &d, const int &i);
	void setMR(const double &d, const Term &t);
	void setVol(const double &d, const Term &t);
private:
	double* forwardcurve;
	double a[3];
	double v[3];
	int count;
};
Code:
//price.cpp
#include <time.h>
#include "price.h"
#include "CCException.h"

Price::Price(const int &n)
{
	count = n;
	for (int i = 0; i < 3; i++) {
		a[i]=0;
		v[i]=0;
	}
	srand(time(NULL));
	forwardcurve = new double[n];
	for (int i = 0; i < n; i++) {
		forwardcurve[i] = (double)(rand() % 1000) / 100;
	}
}

Price::~Price(void)
{
	delete [] forwardcurve;
	forwardcurve = NULL;
}

const double Price::getPrice(const int &i) const
{
	if (i >= 0 && i < count)
		return forwardcurve[i];
	else {
		throw CCException("Index out of range.","Price::GetPrice");
	}
}

void Price::setMR(const double &d, const Term &t)
{
	if (d >= 0)
		a[(int)t] = d;
}

void Price::setVol(const double &d, const Term &t)
{
	if (d >= 0)
		v[(int)t] = d;
}

void Price::setPrice(const double &d, const int &i)
{
	if (d > 0 && i < count)
		forwardcurve[i] = d;
	else{
		throw CCException("Index out of range.","Price::SetPrice");
	}
}
Code:
//main.cpp
#include "price.h"
#include "CCException.h"
#include <iostream>

using namespace std;

int main()
{
	int n = 20;
	Price p = Price(n);
	char buffer[100];

	try {

                //This throws an exception when n=20.
		for (int i = 0; i < n+1; i++)
			cout << p.getPrice(i) << endl;
	}

	//Error catching code.
	catch (const char *e){
		cout << e << endl;
	}
	catch(const CCException e){
		e.PrintMessage();
	}
	catch(...){
		cout << "Unknown Error"<<endl;
	};

	cin.getline(buffer,100);
};