1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 11:42:17 +01:00

All the catches are in place for BlockFile and other errors, now throw.

This commit is contained in:
Paul Licameli
2016-11-07 14:27:31 -05:00
parent b62bddfaeb
commit 55439247ad
12 changed files with 99 additions and 119 deletions

View File

@@ -16,6 +16,7 @@
#include "Audacity.h"
#include "NoteTrack.h"
#include "Experimental.h"
#include <wx/dc.h>
#include <wx/brush.h>
@@ -33,7 +34,7 @@
#include "Prefs.h"
#include "effects/TimeWarper.h"
#include "Experimental.h"
#include "InconsistencyException.h"
#ifdef SONIFY
#include "portmidi.h"
@@ -435,8 +436,8 @@ int NoteTrack::GetVisibleChannels()
Track::Holder NoteTrack::Cut(double t0, double t1)
{
if (t1 <= t0)
//THROW_INCONSISTENCY_EXCEPTION
;
THROW_INCONSISTENCY_EXCEPTION;
double len = t1-t0;
auto newTrack = std::make_unique<NoteTrack>(mDirManager);
@@ -458,8 +459,8 @@ Track::Holder NoteTrack::Cut(double t0, double t1)
Track::Holder NoteTrack::Copy(double t0, double t1, bool) const
{
if (t1 <= t0)
//THROW_INCONSISTENCY_EXCEPTION
;
THROW_INCONSISTENCY_EXCEPTION;
double len = t1-t0;
auto newTrack = std::make_unique<NoteTrack>(mDirManager);
@@ -494,10 +495,9 @@ bool NoteTrack::Trim(double t0, double t1)
void NoteTrack::Clear(double t0, double t1)
{
// If t1 = t0, should Clear return true?
if (t1 <= t0)
// THROW_INCONSISTENCY_EXCEPTION; ?
return;
THROW_INCONSISTENCY_EXCEPTION;
double len = t1-t0;
if (mSeq)