1 /* 2 * Copyright 2006-2008 The FLWOR Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef RUNTIME_FLOWCTL_EXCEPTION 18 #define RUNTIME_FLOWCTL_EXCEPTION 19 20 #include "common/common.h" 21 #include "store/api/iterator.h" 22 23 namespace zorba { 24 25 // TODO: should derive from std::exception 26 class FlowCtlException 27 { 28 public: 29 enum action 30 { 31 BREAK, 32 CONTINUE, 33 EXIT, 34 INTERRUPT 35 }; 36 37 public: 38 action act; 39 40 public: FlowCtlException(action act_)41 FlowCtlException( action act_ ) : act( act_ ) 42 { 43 } 44 }; 45 46 47 class ExitException : public FlowCtlException 48 { 49 public: 50 store::Iterator_t val; 51 52 public: 53 ExitException(store::Iterator_t val_); 54 55 virtual ~ExitException(); 56 }; 57 58 59 } // namespace zorba 60 61 #endif /* FLOWCTL_EXCEPTION */ 62 63 /* 64 * Local variables: 65 * mode: c++ 66 * End: 67 */ 68 /* vim:set et sw=2 ts=2: */ 69