Code example for UnknownHostException

Methods: getMessage

0
	protected void init() { 
		try { 
			mongo = new Mongo(url, port);
			database = mongo.getDB(db);
		} catch (UnknownHostException e) {
			logger.error(e.getMessage());
		} catch (MongoException e) {
			logger.error(e.getMessage());
		} 
	} 
 
	public DBCollection loadCollection(String name) {
		return database.getCollection(name);
	} 
 
	public String getUrl() {
		return url;
	} 
 
	public void setUrl(String url) {
		this.url = url;