Changeset 942


Ignore:
Timestamp:
Dec 3, 2009, 7:21:30 AM (11 years ago)
Author:
Peter Johansson
Message:

closes #419

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Colors.cc

    r941 r942  
    113113    if (hex>64 && hex<71) // A--F
    114114      return hex-55;
     115    std::ostringstream ss;
     116    ss << static_cast<char>(hex) << " is not hexadecimal";
     117    throw std::runtime_error(ss.str());
    115118    return -1;
    116119  }
  • trunk/lib/Configuration.cc

    r928 r942  
    2222#include "Configuration.h"
    2323
     24#include "Colors.h"
    2425#include "Functor.h"
    2526
     
    193194      }
    194195      else if (section == "author-color") {
     196        unsigned char r,g,b;
     197        try {
     198          str2rgb(rhs, r,g,b);
     199        }
     200        catch (std::runtime_error& e) {
     201          throw Config_error(line, e.what());
     202        }
    195203        author_color_[lhs] = rhs;
    196204      }     
Note: See TracChangeset for help on using the changeset viewer.