diff --git a/DESCRIPTION b/DESCRIPTION index 4bd0fba..e7d1bc8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: alation Type: Package Title: Package to connect to Alation API -Version: 1.3 +Version: 1.4 Date: 2015-06-02 Author: Matt Gardner Maintainer: Matt Gardner diff --git a/R/alation.R b/R/alation.R index 0c222a0..dc4d9be 100644 --- a/R/alation.R +++ b/R/alation.R @@ -78,7 +78,7 @@ getToken <- function(user="", password="", url="") if( result == "EXISTING"){ - cat("Token already exists - to create a new token use changeToken().\n") + cat("Token already exists - to update your token use changeToken().\n") return(NULL) } @@ -196,6 +196,10 @@ getQuery <- function(id) path <- path.package("alation") f <- paste(path,"/.token",sep="") + + if(!file.exists(f)) { + stop("You need an Alation token before calling getQuery() - see getToken() for details.") + } load(f) header <- basicTextGatherer() @@ -234,6 +238,10 @@ getResult <- function(id) path <- path.package("alation") f <- paste(path,"/.token",sep="") + + if(!file.exists(f)) { + stop("You need an Alation token before calling getResult() - see getToken() for details.") + } load(f) header <- basicTextGatherer()