Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4ca1089f
Commit
4ca1089f
authored
Jan 20, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/TextInputStream: ReadLine() throws exception on error
parent
926d4150
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
TextInputStream.cxx
src/input/TextInputStream.cxx
+1
-8
TextInputStream.hxx
src/input/TextInputStream.hxx
+3
-1
No files found.
src/input/TextInputStream.cxx
View file @
4ca1089f
...
...
@@ -59,14 +59,7 @@ TextInputStream::ReadLine()
character */
--
dest
.
size
;
size_t
nbytes
;
try
{
nbytes
=
is
->
LockRead
(
dest
.
data
,
dest
.
size
);
}
catch
(...)
{
LogError
(
std
::
current_exception
());
return
nullptr
;
}
size_t
nbytes
=
is
->
LockRead
(
dest
.
data
,
dest
.
size
);
buffer
.
Append
(
nbytes
);
...
...
src/input/TextInputStream.hxx
View file @
4ca1089f
...
...
@@ -47,7 +47,9 @@ public:
/**
* Reads the next line from the stream with newline character stripped.
*
* @return a pointer to the line, or nullptr on end-of-file or error
* Throws on error.
*
* @return a pointer to the line, or nullptr on end-of-file
*/
char
*
ReadLine
();
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment