Last change
on this file since 208 was
176,
checked in by Matthew Whiting, 18 years ago
|
Removed commented out code in duchamp.cc.
|
File size:
728 bytes
|
Rev | Line | |
---|
[120] | 1 | #include <iostream> |
---|
| 2 | #include <iomanip> |
---|
| 3 | #include <string> |
---|
| 4 | #include <duchamp.hh> |
---|
| 5 | |
---|
| 6 | void duchampWarning(std::string subroutine, std::string warning) |
---|
| 7 | { |
---|
| 8 | std::string preamble = "WARNING <" + subroutine + "> : "; |
---|
| 9 | std::cerr << preamble; |
---|
| 10 | for(int i=0;i<warning.size();i++){ |
---|
| 11 | std::cerr << warning[i]; |
---|
| 12 | if((i!=warning.size()-1)&&(warning[i]=='\n')) |
---|
| 13 | std::cerr << std::setw(preamble.size()) <<": "; |
---|
| 14 | } |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | void duchampError(std::string subroutine, std::string error) |
---|
| 18 | { |
---|
[164] | 19 | std::string preamble = "\aERROR <" + subroutine + "> : "; |
---|
[120] | 20 | std::cerr << preamble; |
---|
| 21 | for(int i=0;i<error.size();i++){ |
---|
| 22 | std::cerr << error[i]; |
---|
| 23 | if((i!=error.size()-1)&&(error[i]=='\n')) |
---|
[164] | 24 | std::cerr << std::setw(preamble.size()-1) <<": "; |
---|
[120] | 25 | } |
---|
| 26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.