0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Status.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
22 #include <Common/Compat.h>
23 
24 #include "Status.h"
25 
28 
30 
31 using namespace Hypertable;
32 using namespace Hypertable::RangeServer;
33 
36 
37  try {
38  m_range_server->status(&cb);
39  }
40  catch (Exception &e) {
41  HT_ERROR_OUT << e << HT_END;
42  cb.error(e.code(), e.what());
43  return;
44  }
45 }
Declarations for Status response callback.
Declarations for RangeServer.
Response callback for status function.
Definition: Status.h:46
Compatibility Macros for C/C++.
#define HT_END
Definition: Logger.h:220
#define HT_ERROR_OUT
Definition: Logger.h:301
Hypertable definitions
virtual int error(int error, const String &msg)
Sends a standard error response back to the client.
virtual void run()
Carries out the request.
Definition: Status.cc:34
This is a generic exception class for Hypertable.
Definition: Error.h:314
EventPtr m_event
MESSAGE Event from which handler was initialized.
void status(Response::Callback::Status *cb)
Definition: RangeServer.cc:375
Declarations for ResponseCallback.
int code() const
Returns the error code.
Definition: Error.h:391