Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netrunner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sharinigma
netrunner
Commits
1df32008
Commit
1df32008
authored
7 years ago
by
Odilitime
Browse files
Options
Downloads
Patches
Plain Diff
improve error message
parent
74b1105b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/WebResource.cpp
+4
-1
4 additions, 1 deletion
src/WebResource.cpp
with
4 additions
and
1 deletion
src/WebResource.cpp
+
4
−
1
View file @
1df32008
...
...
@@ -6,6 +6,7 @@
#include
"networking/HTTPRequest.h"
#include
"networking/HTTPResponse.h"
#include
"StringUtils.h"
#include
<iostream>
namespace
{
...
...
@@ -34,8 +35,10 @@ WebResource::WebResource(ResourceType rtype, std::string const& rraw) {
WebResource
getWebResource
(
std
::
string
resourceName
)
{
if
(
isOnlineResource
(
resourceName
))
{
//std::cout << "WebReousrce::getWebResource - isOnline" << std::endl;
return
getOnlineWebResource
(
resourceName
);
}
//std::cout << "WebReousrce::getWebResource - isOffline" << std::endl;
return
getLocalWebResource
(
resourceName
);
}
...
...
@@ -54,7 +57,7 @@ WebResource getLocalWebResource(std::string fileName) {
if
(
strToRT
.
find
(
fileExtension
)
==
strToRT
.
end
())
{
return
WebResource
(
ResourceType
::
INVALID
,
"
Resource type
"
+
fileExtension
+
" not supported"
);
"
Local file with extension
"
+
fileExtension
+
"
is
not supported
. Did you forget a http://?
"
);
}
std
::
ifstream
in
(
fileName
,
std
::
ios
::
in
|
std
::
ios
::
binary
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment