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
526c7781
Commit
526c7781
authored
Jan 18, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/Id3Scan: remove exception handler, let caller catch
There's just one caller, i.e. ScanGenericTags(), which is documented to throw exceptions.
parent
e01bddbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
Id3Scan.cxx
src/tag/Id3Scan.cxx
+3
-13
Id3Scan.hxx
src/tag/Id3Scan.hxx
+4
-1
No files found.
src/tag/Id3Scan.cxx
View file @
526c7781
...
...
@@ -28,12 +28,9 @@
#include "util/ScopeExit.hxx"
#include "util/StringStrip.hxx"
#include "util/StringView.hxx"
#include "Log.hxx"
#include <id3tag.h>
#include <exception>
#include <string.h>
#include <stdlib.h>
...
...
@@ -381,18 +378,11 @@ tag_id3_import(const struct id3_tag *tag) noexcept
}
bool
tag_id3_scan
(
InputStream
&
is
,
TagHandler
&
handler
)
noexcept
tag_id3_scan
(
InputStream
&
is
,
TagHandler
&
handler
)
{
UniqueId3Tag
tag
;
try
{
tag
=
tag_id3_load
(
is
);
if
(
!
tag
)
return
false
;
}
catch
(...)
{
LogError
(
std
::
current_exception
());
auto
tag
=
tag_id3_load
(
is
);
if
(
!
tag
)
return
false
;
}
scan_id3_tag
(
tag
.
get
(),
handler
);
return
true
;
...
...
src/tag/Id3Scan.hxx
View file @
526c7781
...
...
@@ -25,8 +25,11 @@ class TagHandler;
struct
Tag
;
struct
id3_tag
;
/**
* Throws on I/O error.
*/
bool
tag_id3_scan
(
InputStream
&
is
,
TagHandler
&
handler
)
noexcept
;
tag_id3_scan
(
InputStream
&
is
,
TagHandler
&
handler
);
Tag
tag_id3_import
(
const
struct
id3_tag
*
)
noexcept
;
...
...
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