The vbs tools - vbs_ls, vbs_rm, vbs_fs - for listing, removing and mounting vbs and Mark6 format scattered VLBI recordings on FlexBuff and Mark6 systems
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

56 lines
1.5 KiB

  1. // implementation
  2. // Copyright (C) 2007-2008 Harro Verkouter
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful, but WITHOUT ANY
  10. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. // PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. //
  13. // You should have received a copy of the GNU General Public License
  14. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. //
  16. // Author: Harro Verkouter - verkouter@jive.nl
  17. // Joint Institute for VLBI in Europe
  18. // P.O. Box 2
  19. // 7990 AA Dwingeloo
  20. #include <dosyscall.h>
  21. #include <errno.h>
  22. #include <string.h>
  23. using namespace std;
  24. //
  25. // The 'last system-error type'
  26. //
  27. lastsyserror_type::lastsyserror_type():
  28. sys_errno( errno ), sys_errormessage( ((sys_errno!=0)?(::strerror(sys_errno)):("<success>")) )
  29. {}
  30. // if errno == 0, don't show anything
  31. ostream& operator<<( ostream& os, const lastsyserror_type& lse ) {
  32. if( lse.sys_errno!=0 )
  33. os << " - " << lse.sys_errormessage << "(" << lse.sys_errno << ")";
  34. return os;
  35. }
  36. //
  37. // the exception
  38. //
  39. syscallexception::syscallexception( const string& s ):
  40. msg( s )
  41. {}
  42. const char* syscallexception::what() const throw() {
  43. return msg.c_str();
  44. }
  45. syscallexception::~syscallexception() throw()
  46. {}