catch const wchar_t *

Originally committed to SVN as r323.
This commit is contained in:
David Lamparter 2006-04-14 16:46:38 +00:00
parent 7d31182c59
commit 18b92130b8
9 changed files with 13 additions and 13 deletions

View File

@ -105,7 +105,7 @@ void AssFile::Load (const wxString _filename,const wxString charset) {
}
// String error
catch (wchar_t *except) {
catch (const wchar_t *except) {
wxMessageBox(except,_T("Error loading file"),wxICON_ERROR | wxOK);
ok = false;
}

View File

@ -185,7 +185,7 @@ void DialogAutomationManager::OnAdd(wxCommandEvent &event)
catch (wxString &err) {
wxMessageBox(wxString::Format(_T("Error loading Automation script %s:\r\n\r\n%s"), sfnames.c_str(), err.c_str()), _T("Error loading Automation script"), wxOK|wxICON_ERROR, this);
}
catch (wchar_t *err) {
catch (const wchar_t *err) {
wxMessageBox(wxString::Format(_T("Error loading Automation script %s:\r\n\r\n%s"), sfnames.c_str(), err), _T("Error loading Automation script"), wxOK|wxICON_ERROR, this);
}
catch (...) {

View File

@ -192,7 +192,7 @@ void DialogExport::OnProcess(wxCommandEvent &event) {
Export->GetOriginalSubs()->SetScriptInfo(_T("Export Encoding"), CharsetList->GetStringSelection());
Export->Export(filename, CharsetList->GetStringSelection());
}
catch (wchar_t *error) {
catch (const wchar_t *error) {
wxString err(error);
wxMessageBox(err, _T("Error exporting subtitles"), wxOK | wxICON_ERROR, this);
}

View File

@ -198,7 +198,7 @@ void DialogResample::OnResample (wxCommandEvent &event) {
curDiag->ClearBlocks();
continue;
}
catch (wchar_t *err) {
catch (const wchar_t *err) {
wxLogMessage(err);
}
catch (wxString err) {

View File

@ -515,7 +515,7 @@ void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
SubsBox->LoadDefault(AssFile::top);
}
}
catch (wchar_t *err) {
catch (const wchar_t *err) {
wxMessageBox(wxString(err), _T("Error"), wxOK | wxICON_ERROR, NULL);
return;
}
@ -593,7 +593,7 @@ bool FrameMain::SaveSubtitles(bool saveas,bool withCharset) {
AssFile::top->Save(filename,true,true,charset);
UpdateTitle();
}
catch (wchar_t *err) {
catch (const wchar_t *err) {
wxMessageBox(wxString(err), _T("Error"), wxOK | wxICON_ERROR, NULL);
return false;
}
@ -873,7 +873,7 @@ void FrameMain::LoadVideo(wxString file,bool autoload) {
}
videoBox->videoDisplay->SetVideo(file);
}
catch (wchar_t *error) {
catch (const wchar_t *error) {
wxString err(error);
wxMessageBox(err, _T("Error opening video file"), wxOK | wxICON_ERROR, this);
}
@ -921,7 +921,7 @@ void FrameMain::LoadAudio(wxString filename,bool FromVideo) {
audioBox->SetFile(filename,FromVideo);
SetDisplayMode(-1);
}
catch (wchar_t *error) {
catch (const wchar_t *error) {
wxString err(error);
wxMessageBox(err, _T("Error opening audio file"), wxOK | wxICON_ERROR, this);
}
@ -947,7 +947,7 @@ void FrameMain::LoadVFR(wxString filename) {
SubsBox->Refresh(false);
}
// Fail
catch (wchar_t *error) {
catch (const wchar_t *error) {
wxString err(error);
wxMessageBox(err, _T("Error opening timecodes file"), wxOK | wxICON_ERROR, this);
}

View File

@ -1064,7 +1064,7 @@ void FrameMain::OnAutoSave(wxTimerEvent &event) {
catch (wxString err) {
StatusTimeout(_T("Exception when attempting to autosave file: ") + err);
}
catch (wchar_t *err) {
catch (const wchar_t *err) {
StatusTimeout(_T("Exception when attempting to autosave file: ") + wxString(err));
}
catch (...) {

View File

@ -114,7 +114,7 @@ bool AegisubApp::OnInit() {
SetTopWindow(frame);
}
catch (wchar_t *err) {
catch (const wchar_t *err) {
wxMessageBox(err,_T("Fatal error while initializing"));
return false;
}

View File

@ -79,7 +79,7 @@ void ASSSubtitleFormat::ReadFile(wxString filename,wxString encoding) {
try {
lasttime = AddLine(wxbuffer,curgroup,lasttime,IsSSA);
}
catch (wchar_t *err) {
catch (const wchar_t *err) {
Clear();
throw wxString(_T("Error processing line: ")) + wxbuffer + _T(": ") + wxString(err);
}

View File

@ -73,7 +73,7 @@ VideoProvider *VideoProvider::GetProvider(wxString video,wxString subtitles) {
}
// Catch error
catch (wchar_t *err) {
catch (const wchar_t *err) {
error = err;
}
catch (...) {