Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn -> @warn #15

Merged
merged 1 commit into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/FredData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mutable struct Fred
# Key validation
if length(key) > API_KEY_LENGTH
key = key[1:API_KEY_LENGTH]
warn("FRED API key too long. First $(API_KEY_LENGTH) chars used.")
@warn("FRED API key too long. First $(API_KEY_LENGTH) chars used.")
elseif length(key) < API_KEY_LENGTH
error("Invalid FRED API key -- key too short: $(key)")
end
Expand Down
6 changes: 3 additions & 3 deletions src/get_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function get_data(f::Fred, series::AbstractString; kwargs...)
metadata_parsed[Symbol(k)] = metadata_json["seriess"][1][k]
catch err
metadata_parsed[Symbol(k)] = ""
warn("Metadata '$k' not returned from server.")
@warn("Metadata '$k' not returned from server.")
end
end

Expand Down Expand Up @@ -174,14 +174,14 @@ function validate_args!(kwargs)
end
vds_early = map(x -> x<EARLY_VINTAGE_DATE, vds_arr)
if any(vds_early)
warn(:vintage_dates, ": Early vintage date, data might not exist: ",
@warn(:vintage_dates, ": Early vintage date, data might not exist: ",
vds_arr[vds_early])
end
end
# all remaining keys have unspecified behavior
if length(d) > 0
for k in keys(d)
warn(string(k), ": Bad key. Removed from query.")
@warn(string(k), ": Bad key. Removed from query.")
deleteat!(kwargs, findall(x -> x[1]==k, kwargs))
end
end
Expand Down