Package com.imaginea.mongodb.exceptions

Examples of com.imaginea.mongodb.exceptions.ApplicationException


                                        mongoInstance.dropDatabase(dbName);
                                    }
                                }

                            } catch (MongoException m) {
                                ApplicationException e = new ApplicationException(ErrorCodes.QUERY_EXECUTION_EXCEPTION, "GET_DOCUMENT_LIST_EXCEPTION", m.getCause());
                                throw e;
                            }
                            return null;
                        }
                    });
View Full Code Here


                                        mongoInstance.getDB(dbName).getCollection(collName).remove(documentName);
                                    }
                                }

                            } catch (MongoException m) {
                                ApplicationException e = new ApplicationException(ErrorCodes.DB_CREATION_EXCEPTION, "DB_CREATION_EXCEPTION", m.getCause());
                                throw e;
                            }
                            return null;
                        }
                    });
View Full Code Here

                            // Db not populate by test Cases
                            mongoInstance.dropDatabase(dbName);
                        }
                    } catch (MongoException m) // while dropping Db
                    {
                        throw new ApplicationException(ErrorCodes.GET_DB_LIST_EXCEPTION, "Error Testing Database List", m.getCause());
                    }
                    return null;
                }
            });
        }
View Full Code Here

                            assertTrue("Db should be created when it is a non empty string", dbNames.contains(dbName));
                            // Db not populate by test Cases
                            mongoInstance.dropDatabase(dbName);
                        }
                    } catch (MongoException m) {
                        ApplicationException e = new ApplicationException(ErrorCodes.DB_CREATION_EXCEPTION, "Error Testing Database insert operation", m.getCause());
                        formErrorResponse(logger, e);
                        throw e;
                    }
                    return null;
                }
View Full Code Here

                            assertFalse("Check db Name is it droped properly", dbNames.contains(dbName));
                            // Db not populate by test Cases
                            mongoInstance.dropDatabase(dbName);
                        }
                    } catch (MongoException m) {
                        ApplicationException e = new ApplicationException(ErrorCodes.DB_DELETION_EXCEPTION, "Error Testing Database delete operation", m.getCause());
                        throw e;
                    }
                    return null;
                }
            });
View Full Code Here

                                // Db
                                break;
                            }
                        }
                    } catch (MongoException m) {
                        throw new ApplicationException(ErrorCodes.GET_DB_STATS_EXCEPTION, m.getMessage());
                    }
                    return null;
                }
            });
        }
View Full Code Here

                            assert (dbNames.contains(dbName));
                            mongoInstance.dropDatabase(dbName);
                        }
                    } catch (MongoException m) {
                        logger.error(m.getMessage(), m);
                        ApplicationException e = new ApplicationException(ErrorCodes.GET_DB_LIST_EXCEPTION, "GET_DB_LIST_EXCEPTION", m.getCause());
                        throw e;
                    }
                    return null;
                }
            });
View Full Code Here

                            assert (dbNames.contains(dbName));
                            mongoInstance.dropDatabase(dbName);
                        }

                    } catch (MongoException m) {
                        ApplicationException e = new ApplicationException(ErrorCodes.DB_CREATION_EXCEPTION, "DB_CREATION_EXCEPTION", m.getCause());
                        throw e;
                    }
                    return null;
                }
            });
View Full Code Here

                            assert (!dbNames.contains(dbName));
                            mongoInstance.dropDatabase(dbName);
                        }

                    } catch (MongoException m) {
                        ApplicationException e = new ApplicationException(ErrorCodes.DB_DELETION_EXCEPTION, "DB_DELETION_EXCEPTION", m.getCause());
                        throw e;
                    }
                    return null;

                }
View Full Code Here

                            // Db not populate by test Cases
                            mongoInstance.dropDatabase(dbName);
                        } catch (MongoException m) {
                            // Throw a new Exception here if mongoexception in
                            // this code
                            throw new ApplicationException(ErrorCodes.GET_COLLECTION_LIST_EXCEPTION, "Error While testing Get Collections", m.getCause());
                        }
                        // Return nothing . Just error written in log
                        return null;
                    }
                });
View Full Code Here

TOP

Related Classes of com.imaginea.mongodb.exceptions.ApplicationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.