File: VectorOutOfRange.cpp

package info (click to toggle)
clustalx 2.1%2Blgpl-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,868 kB
  • sloc: cpp: 40,050; sh: 163; xml: 102; makefile: 15
file content (42 lines) | stat: -rw-r--r-- 923 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
 * Author: Mark Larkin
 * 
 * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
 */
#ifdef HAVE_CONFIG_H
    #include "config.h"
#endif
#include "VectorOutOfRange.h"
#include <string>
#include <sstream>
#include <iostream>

namespace clustalw
{

VectorOutOfRange::~VectorOutOfRange() throw()
{
    // Dont need to do anything
}

const char* VectorOutOfRange::what() const throw()
{
    std::ostringstream message;
    message << "\nIn Vector "<< _name << ", vector index " << _index << " exceeds bounds 1-" 
            << _max << "\n";
    std::string outputMessage = message.str();
    return outputMessage.c_str();
}

const char* VectorOutOfRange::what()
{
    std::ostringstream message;
    message << "\nIn Vector "<< _name << ", vector index " << _index << " exceeds bounds 1-" 
            << _max << "\n";
    std::string outputMessage = message.str();
    return outputMessage.c_str();
}

}