Commit 067bf851 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

change IOError class name spelling to IO_ERROR to conform to coding standards

parent 7a92a96a
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -224,18 +224,18 @@ bool DSNLEXER::IsSymbol( int aTok )
}


void DSNLEXER::ThrowIOError( wxString aText, int charOffset ) throw (IOError)
void DSNLEXER::ThrowIOError( wxString aText, int charOffset ) throw( IO_ERROR )
{
    // append to aText, do not overwrite
    aText << wxT(" ") << _("in") << wxT(" \"") << CurSource()
          << wxT("\" ") << _("on line") << wxT(" ") << reader->LineNumber()
          << wxT(" ") << _("at offset") << wxT(" ") << charOffset;

    throw IOError( aText );
    throw IO_ERROR( aText );
}


void DSNLEXER::Expecting( int aTok ) throw( IOError )
void DSNLEXER::Expecting( int aTok ) throw( IO_ERROR )
{
    wxString    errText( _("Expecting") );
    errText << wxT(" ") << GetTokenString( aTok );
@@ -243,7 +243,7 @@ void DSNLEXER::Expecting( int aTok ) throw( IOError )
}


void DSNLEXER::Expecting( const wxString& text ) throw( IOError )
void DSNLEXER::Expecting( const wxString& text ) throw( IO_ERROR )
{
    wxString    errText( _("Expecting") );
    errText << wxT(" '") << text << wxT("'");
@@ -251,7 +251,7 @@ void DSNLEXER::Expecting( const wxString& text ) throw( IOError )
}


void DSNLEXER::Unexpected( int aTok ) throw( IOError )
void DSNLEXER::Unexpected( int aTok ) throw( IO_ERROR )
{
    wxString    errText( _("Unexpected") );
    errText << wxT(" ") << GetTokenString( aTok );
@@ -259,7 +259,7 @@ void DSNLEXER::Unexpected( int aTok ) throw( IOError )
}


void DSNLEXER::Unexpected( const wxString& text ) throw( IOError )
void DSNLEXER::Unexpected( const wxString& text ) throw( IO_ERROR )
{
    wxString    errText( _("Unexpected") );
    errText << wxT(" '") << text << wxT("'");
@@ -267,7 +267,7 @@ void DSNLEXER::Unexpected( const wxString& text ) throw( IOError )
}


void DSNLEXER::NeedLEFT() throw( IOError )
void DSNLEXER::NeedLEFT() throw( IO_ERROR )
{
    int tok = NextTok();
    if( tok != DSN_LEFT )
@@ -275,7 +275,7 @@ void DSNLEXER::NeedLEFT() throw( IOError )
}


void DSNLEXER::NeedRIGHT() throw( IOError )
void DSNLEXER::NeedRIGHT() throw( IO_ERROR )
{
    int tok = NextTok();
    if( tok != DSN_RIGHT )
@@ -283,7 +283,7 @@ void DSNLEXER::NeedRIGHT() throw( IOError )
}


int DSNLEXER::NeedSYMBOL() throw( IOError )
int DSNLEXER::NeedSYMBOL() throw( IO_ERROR )
{
    int tok = NextTok();
    if( !IsSymbol( tok ) )
@@ -292,7 +292,7 @@ int DSNLEXER::NeedSYMBOL() throw( IOError )
}


int DSNLEXER::NeedSYMBOLorNUMBER() throw( IOError )
int DSNLEXER::NeedSYMBOLorNUMBER() throw( IO_ERROR )
{
    int  tok = NextTok();
    if( !IsSymbol( tok ) && tok!=DSN_NUMBER )
@@ -312,7 +312,7 @@ static inline bool isSpace( int cc )
}


int DSNLEXER::NextTok() throw (IOError)
int DSNLEXER::NextTok() throw( IO_ERROR )
{
    char*   cur  = next;
    char*   head = cur;
@@ -1380,7 +1380,7 @@ class DSNTEST : public wxApp
    DSNLEXER*   lexer;
    int         nestLevel;

    void        recursion() throw( IOError );
    void        recursion() throw( IO_ERROR );

    void        indent()
    {
@@ -1485,7 +1485,7 @@ bool DSNTEST::OnInit()
        }
        printf("\n");
    }
    catch( IOError ioe )
    catch( IO_ERROR ioe )
    {
        fprintf( stderr, "%s\n", CONV_TO_UTF8( ioe.errorText ) );
    }
@@ -1494,7 +1494,7 @@ bool DSNTEST::OnInit()
}


void DSNTEST::recursion() throw(IOError)
void DSNTEST::recursion() throw( IO_ERROR )
{
    int         tok;
    const char* space = "";
+12 −12
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ FILE_LINE_READER::FILE_LINE_READER( FILE* aFile, const wxString& aFileName, unsi
}


unsigned FILE_LINE_READER::ReadLine() throw (IOError)
unsigned FILE_LINE_READER::ReadLine() throw( IO_ERROR )
{
    length  = 0;
    line[0] = 0;
@@ -101,7 +101,7 @@ unsigned FILE_LINE_READER::ReadLine() throw (IOError)
        length += strlen( line + length );

        if( length == maxLineLength )
            throw IOError( _("Line length exceeded") );
            throw IO_ERROR( _("Line length exceeded") );

        // a normal line breaks here, once through while loop
        if( length+1 < capacity || line[length-1] == '\n' )
@@ -117,7 +117,7 @@ unsigned FILE_LINE_READER::ReadLine() throw (IOError)
}


unsigned STRING_LINE_READER::ReadLine() throw (IOError)
unsigned STRING_LINE_READER::ReadLine() throw( IO_ERROR )
{
    size_t  nlOffset = lines.find( '\n', ndx );

@@ -129,7 +129,7 @@ unsigned STRING_LINE_READER::ReadLine() throw (IOError)
    if( length )
    {
        if( length >= maxLineLength )
            throw IOError( _("Line length exceeded") );
            throw IO_ERROR( _("Line length exceeded") );

        if( length+1 > capacity )   // +1 for terminating nul
            expandCapacity( length+1 );
@@ -186,7 +186,7 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote
}


int OUTPUTFORMATTER::vprint( const char* fmt,  va_list ap )  throw( IOError )
int OUTPUTFORMATTER::vprint( const char* fmt,  va_list ap )  throw( IO_ERROR )
{
    int ret = vsnprintf( &buffer[0], buffer.size(), fmt, ap );
    if( ret >= (int) buffer.size() )
@@ -202,7 +202,7 @@ int OUTPUTFORMATTER::vprint( const char* fmt, va_list ap ) throw( IOError )
}


int OUTPUTFORMATTER::sprint( const char* fmt, ... )  throw( IOError )
int OUTPUTFORMATTER::sprint( const char* fmt, ... )  throw( IO_ERROR )
{
    va_list     args;

@@ -214,7 +214,7 @@ int OUTPUTFORMATTER::sprint( const char* fmt, ... ) throw( IOError )
}


int OUTPUTFORMATTER::Print( int nestLevel, const char* fmt, ... ) throw( IOError )
int OUTPUTFORMATTER::Print( int nestLevel, const char* fmt, ... ) throw( IO_ERROR )
{
#define NESTWIDTH           2   ///< how many spaces per nestLevel

@@ -243,7 +243,7 @@ int OUTPUTFORMATTER::Print( int nestLevel, const char* fmt, ... ) throw( IOError
}


const char* OUTPUTFORMATTER::Quoted( std::string* aWrapee ) throw( IOError )
const char* OUTPUTFORMATTER::Quoted( std::string* aWrapee ) throw( IO_ERROR )
{
    // derived class's notion of what a quote character is
    char quote          = *GetQuoteChar( "(" );
@@ -268,7 +268,7 @@ const char* OUTPUTFORMATTER::Quoted( std::string* aWrapee ) throw( IOError )
            // a decision was made to make all S-expression strings be on a single
            // line.  You can embedd \n (human readable) in the text but not
            // '\n' which is 0x0a.
            throw IOError( _( "S-expression string has newline" ) );
            throw IO_ERROR( _( "S-expression string has newline" ) );
        }
    }

@@ -285,7 +285,7 @@ const char* OUTPUTFORMATTER::Quoted( std::string* aWrapee ) throw( IOError )

//-----<STRING_FORMATTER>----------------------------------------------------

void STRING_FORMATTER::write( const char* aOutBuf, int aCount ) throw( IOError )
void STRING_FORMATTER::write( const char* aOutBuf, int aCount ) throw( IO_ERROR )
{
    mystring.append( aOutBuf, aCount );
}
@@ -314,7 +314,7 @@ const char* STREAM_OUTPUTFORMATTER::GetQuoteChar( const char* wrapee )
}


void STREAM_OUTPUTFORMATTER::write( const char* aOutBuf, int aCount ) throw( IOError )
void STREAM_OUTPUTFORMATTER::write( const char* aOutBuf, int aCount ) throw( IO_ERROR )
{
    int lastWrite;

@@ -326,7 +326,7 @@ void STREAM_OUTPUTFORMATTER::write( const char* aOutBuf, int aCount ) throw( IOE

        if( !os.IsOk() )
        {
            throw IOError( _( "OUTPUTSTREAM_OUTPUTFORMATTER write error" ) );
            throw IO_ERROR( _( "OUTPUTSTREAM_OUTPUTFORMATTER write error" ) );
        }
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
typedef wxXmlProperty   XATTR;


void XNODE::Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError )
void XNODE::Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IO_ERROR )
{
    switch( GetType() )
    {
@@ -48,7 +48,7 @@ void XNODE::Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError )
}


void XNODE::FormatContents( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError )
void XNODE::FormatContents( OUTPUTFORMATTER* out, int nestLevel ) throw( IO_ERROR )
{
    std::string utf8;

+1 −1
Original line number Diff line number Diff line
@@ -613,7 +613,7 @@ void WinEDA_SchematicFrame::LoadSettings()
        {
            m_TemplateFieldNames.Parse( &lexer );
        }
        catch( IOError e )
        catch( IO_ERROR e )
        {
            // @todo show error msg
            D(printf("templatefieldnames parsing error: '%s'\n",
+1 −1
Original line number Diff line number Diff line
@@ -1055,7 +1055,7 @@ bool EXPORT_HELP::WriteGENERICNetList( WinEDA_SchematicFrame* frame, const wxStr
            STREAM_OUTPUTFORMATTER  outputFormatter( os );
            xroot->Format( &outputFormatter, 0 );
        }
        catch( IOError ioe )
        catch( IO_ERROR ioe )
        {
            delete xroot;
            goto L_error;
Loading