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
914df18b
Commit
914df18b
authored
7 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main, ...: catch any exception, not just std::runtime_error
parent
a539094c
sisyphus
0.23.15-alt1
0.23.14-alt1
0.23.13-alt1
0.23.12-alt1
0.23.11-alt1
0.23.8-alt3
0.23.8-alt2
0.23.8-alt1
0.21.24-alt1.1
0.21.24-alt1
gb-sisyphus-task339776.6100
gb-sisyphus-task337393.100
gb-sisyphus-task337176.300
gb-sisyphus-task334590.100
gb-sisyphus-task333607.100
gb-sisyphus-task331543.2500
gb-sisyphus-task328663.4700
gb-sisyphus-task325064.100
gb-sisyphus-task319111.4000
gb-sisyphus-task313704.100
gb-sisyphus-task312885.100
gb-sisyphus-task308905.3200
gb-sisyphus-task305294.500
gb-sisyphus-task304007.100
gb-sisyphus-task303674.1700
gb-sisyphus-task298681.300
gb-sisyphus-task296051.1000
gb-sisyphus-task274827.100
gb-sisyphus-task269249.2000
gb-sisyphus-task266579.400
gb-sisyphus-task258132.600
gb-sisyphus-task254601.200
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
79 changed files
with
235 additions
and
243 deletions
+235
-243
Instance.cxx
src/Instance.cxx
+2
-2
Listen.cxx
src/Listen.cxx
+3
-3
Main.cxx
src/Main.cxx
+1
-1
PlaylistSave.cxx
src/PlaylistSave.cxx
+3
-3
SongFilter.cxx
src/SongFilter.cxx
+2
-2
SongUpdate.cxx
src/SongUpdate.cxx
+2
-2
Stats.cxx
src/Stats.cxx
+2
-2
TagFile.cxx
src/TagFile.cxx
+3
-3
TagStream.cxx
src/TagStream.cxx
+2
-2
StorageCommands.cxx
src/command/StorageCommands.cxx
+1
-1
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+6
-6
Archive.cxx
src/db/update/Archive.cxx
+3
-3
Container.cxx
src/db/update/Container.cxx
+2
-2
ExcludeList.cxx
src/db/update/ExcludeList.cxx
+4
-4
InotifyUpdate.cxx
src/db/update/InotifyUpdate.cxx
+8
-8
UpdateIO.cxx
src/db/update/UpdateIO.cxx
+6
-6
Walk.cxx
src/db/update/Walk.cxx
+2
-2
Bridge.cxx
src/decoder/Bridge.cxx
+2
-2
DecoderAPI.cxx
src/decoder/DecoderAPI.cxx
+2
-2
DecoderThread.cxx
src/decoder/DecoderThread.cxx
+1
-1
AudiofileDecoderPlugin.cxx
src/decoder/plugins/AudiofileDecoderPlugin.cxx
+3
-3
DsdLib.cxx
src/decoder/plugins/DsdLib.cxx
+2
-2
FaadDecoderPlugin.cxx
src/decoder/plugins/FaadDecoderPlugin.cxx
+3
-3
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+4
-4
FfmpegIo.cxx
src/decoder/plugins/FfmpegIo.cxx
+2
-2
FlacCommon.cxx
src/decoder/plugins/FlacCommon.cxx
+3
-3
FlacDecoderPlugin.cxx
src/decoder/plugins/FlacDecoderPlugin.cxx
+1
-1
FlacIOHandle.cxx
src/decoder/plugins/FlacIOHandle.cxx
+3
-3
FlacInput.cxx
src/decoder/plugins/FlacInput.cxx
+3
-3
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+1
-1
MpcdecDecoderPlugin.cxx
src/decoder/plugins/MpcdecDecoderPlugin.cxx
+2
-2
OggDecoder.cxx
src/decoder/plugins/OggDecoder.cxx
+2
-2
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+2
-2
PcmDecoderPlugin.cxx
src/decoder/plugins/PcmDecoderPlugin.cxx
+7
-7
SndfileDecoderPlugin.cxx
src/decoder/plugins/SndfileDecoderPlugin.cxx
+3
-3
VorbisDecoderPlugin.cxx
src/decoder/plugins/VorbisDecoderPlugin.cxx
+2
-2
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+2
-2
ServerSocket.cxx
src/event/ServerSocket.cxx
+2
-2
ReplayGainFilterPlugin.cxx
src/filter/plugins/ReplayGainFilterPlugin.cxx
+4
-3
AllocatedPath.cxx
src/fs/AllocatedPath.cxx
+3
-3
CheckFile.cxx
src/fs/CheckFile.cxx
+2
-2
Path.cxx
src/fs/Path.cxx
+1
-3
Init.cxx
src/input/Init.cxx
+1
-1
TextInputStream.cxx
src/input/TextInputStream.cxx
+2
-2
CaseFold.cxx
src/lib/icu/CaseFold.cxx
+1
-2
Collate.cxx
src/lib/icu/Collate.cxx
+4
-4
OggFind.cxx
src/lib/xiph/OggFind.cxx
+1
-3
MixerAll.cxx
src/mixer/MixerAll.cxx
+4
-4
AlsaMixerPlugin.cxx
src/mixer/plugins/AlsaMixerPlugin.cxx
+1
-1
UpnpNeighborPlugin.cxx
src/neighbor/plugins/UpnpNeighborPlugin.cxx
+2
-2
Control.cxx
src/output/Control.cxx
+3
-2
Filtered.cxx
src/output/Filtered.cxx
+7
-7
Init.cxx
src/output/Init.cxx
+4
-4
MultipleOutputs.cxx
src/output/MultipleOutputs.cxx
+1
-1
Thread.cxx
src/output/Thread.cxx
+17
-14
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+1
-1
FifoOutputPlugin.cxx
src/output/plugins/FifoOutputPlugin.cxx
+2
-2
PulseOutputPlugin.cxx
src/output/plugins/PulseOutputPlugin.cxx
+1
-1
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+11
-11
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+1
-1
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+3
-3
Thread.cxx
src/player/Thread.cxx
+7
-7
PlaylistRegistry.cxx
src/playlist/PlaylistRegistry.cxx
+2
-4
PlaylistSong.cxx
src/playlist/PlaylistSong.cxx
+1
-3
PlaylistStream.cxx
src/playlist/PlaylistStream.cxx
+7
-7
PlaylistUpdate.cxx
src/queue/PlaylistUpdate.cxx
+1
-3
QueueSave.cxx
src/queue/QueueSave.cxx
+4
-2
SongSticker.cxx
src/sticker/SongSticker.cxx
+1
-3
CompositeStorage.cxx
src/storage/CompositeStorage.cxx
+1
-1
CurlStorage.cxx
src/storage/plugins/CurlStorage.cxx
+1
-1
LocalStorage.cxx
src/storage/plugins/LocalStorage.cxx
+1
-1
ApeLoader.cxx
src/tag/ApeLoader.cxx
+1
-2
Generic.cxx
src/tag/Generic.cxx
+4
-4
Id3Load.cxx
src/tag/Id3Load.cxx
+10
-11
Id3Scan.cxx
src/tag/Id3Scan.cxx
+3
-3
FakeDecoderAPI.cxx
test/FakeDecoderAPI.cxx
+1
-3
TestIcu.cxx
test/TestIcu.cxx
+2
-2
run_inotify.cxx
test/run_inotify.cxx
+4
-2
run_resolver.cxx
test/run_resolver.cxx
+3
-3
No files found.
src/Instance.cxx
View file @
914df18b
...
...
@@ -32,7 +32,7 @@
#endif
#endif
#include <
stdexcept
>
#include <
exception
>
Instance
::
Instance
()
:
idle_monitor
(
event_loop
,
BIND_THIS_METHOD
(
OnIdle
))
...
...
@@ -84,7 +84,7 @@ Instance::OnDatabaseSongRemoved(const char *uri)
if
(
sticker_enabled
())
{
try
{
sticker_song_delete
(
uri
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
#endif
...
...
This diff is collapsed.
Click to expand it.
src/Listen.cxx
View file @
914df18b
...
...
@@ -120,7 +120,7 @@ listen_global_init(EventLoop &loop, Partition &partition)
do
{
try
{
listen_add_config_param
(
port
,
param
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
delete
listen_socket
;
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to listen on %s (line %i)"
,
param
->
value
.
c_str
(),
...
...
@@ -133,7 +133,7 @@ listen_global_init(EventLoop &loop, Partition &partition)
try
{
listen_socket
->
AddPort
(
port
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
delete
listen_socket
;
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to listen on *:%d: "
,
port
));
}
...
...
@@ -141,7 +141,7 @@ listen_global_init(EventLoop &loop, Partition &partition)
try
{
listen_socket
->
Open
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
delete
listen_socket
;
throw
;
}
...
...
This diff is collapsed.
Click to expand it.
src/Main.cxx
View file @
914df18b
...
...
@@ -379,7 +379,7 @@ initialize_decoder_and_player(const ReplayGainConfig &replay_gain_config)
try
{
configured_audio_format
=
ParseAudioFormat
(
param
->
value
.
c_str
(),
true
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"error parsing line %i"
,
param
->
line
));
}
...
...
This diff is collapsed.
Click to expand it.
src/PlaylistSave.cxx
View file @
914df18b
...
...
@@ -32,7 +32,7 @@
#include "fs/io/BufferedOutputStream.hxx"
#include "util/UriUtil.hxx"
#include <
stdexcept
>
#include <
exception
>
static
void
playlist_print_path
(
BufferedOutputStream
&
os
,
const
Path
path
)
...
...
@@ -57,7 +57,7 @@ playlist_print_song(BufferedOutputStream &os, const DetachedSong &song)
try
{
const
auto
uri_fs
=
AllocatedPath
::
FromUTF8Throw
(
uri_utf8
);
playlist_print_path
(
os
,
uri_fs
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
...
...
@@ -76,7 +76,7 @@ playlist_print_uri(BufferedOutputStream &os, const char *uri)
if
(
!
path
.
IsNull
())
playlist_print_path
(
os
,
path
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
...
...
This diff is collapsed.
Click to expand it.
src/SongFilter.cxx
View file @
914df18b
...
...
@@ -30,7 +30,7 @@
#include "util/UriUtil.hxx"
#include "lib/icu/CaseFold.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
#include <stdlib.h>
...
...
@@ -190,7 +190,7 @@ ParseTimeStamp(const char *s)
try
{
/* try ISO 8601 */
return
ParseTimePoint
(
s
,
"%FT%TZ"
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
std
::
chrono
::
system_clock
::
time_point
::
min
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/SongUpdate.cxx
View file @
914df18b
...
...
@@ -34,7 +34,7 @@
#include "TagArchive.hxx"
#endif
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
#include <string.h>
...
...
@@ -68,7 +68,7 @@ Song::UpdateFile(Storage &storage)
StorageFileInfo
info
;
try
{
info
=
storage
.
GetInfo
(
relative_uri
.
c_str
(),
true
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/Stats.cxx
View file @
914df18b
...
...
@@ -77,8 +77,8 @@ stats_update(const Database &db)
stats
=
db
.
GetStats
(
selection
);
stats_validity
=
StatsValidity
::
VALID
;
return
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
stats_validity
=
StatsValidity
::
FAILED
;
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/TagFile.cxx
View file @
914df18b
...
...
@@ -29,7 +29,7 @@
#include "input/LocalOpen.hxx"
#include "thread/Cond.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
...
...
@@ -64,13 +64,13 @@ public:
try
{
is
=
OpenLocalInputStream
(
path_fs
,
mutex
,
cond
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
}
else
{
try
{
is
->
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
...
...
This diff is collapsed.
Click to expand it.
src/TagStream.cxx
View file @
914df18b
...
...
@@ -30,7 +30,7 @@
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
...
...
@@ -66,7 +66,7 @@ tag_stream_scan(InputStream &is, const TagHandler &handler, void *ctx)
&
handler
,
ctx
](
const
DecoderPlugin
&
plugin
){
try
{
is
.
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
return
CheckDecoderPlugin
(
plugin
,
suffix
,
mime
)
&&
...
...
This diff is collapsed.
Click to expand it.
src/command/StorageCommands.cxx
View file @
914df18b
...
...
@@ -68,7 +68,7 @@ handle_listfiles_storage(Response &r, StorageDirectoryReader &reader)
StorageFileInfo
info
;
try
{
info
=
reader
.
GetInfo
(
false
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
continue
;
}
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
914df18b
...
...
@@ -361,10 +361,10 @@ ProxyDatabase::Open()
try
{
Connect
();
}
catch
(
const
std
::
runtime_error
&
error
)
{
}
catch
(
...
)
{
/* this error is non-fatal, because this plugin will
attempt to reconnect again automatically */
LogError
(
error
);
LogError
(
std
::
current_exception
()
);
}
}
...
...
@@ -473,8 +473,8 @@ ProxyDatabase::OnSocketReady(gcc_unused unsigned flags) noexcept
if
(
idle
==
0
)
{
try
{
CheckError
(
connection
);
}
catch
(
const
std
::
runtime_error
&
error
)
{
LogError
(
error
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
Disconnect
();
return
false
;
}
...
...
@@ -508,8 +508,8 @@ ProxyDatabase::OnIdle() noexcept
if
(
!
mpd_send_idle_mask
(
connection
,
MPD_IDLE_DATABASE
))
{
try
{
ThrowError
(
connection
);
}
catch
(
const
std
::
runtime_error
&
error
)
{
LogError
(
error
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
}
SocketMonitor
::
Steal
();
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Archive.cxx
View file @
914df18b
...
...
@@ -34,7 +34,7 @@
#include "Log.hxx"
#include <string>
#include <
stdexcept
>
#include <
exception
>
#include <string.h>
...
...
@@ -153,8 +153,8 @@ UpdateWalk::UpdateArchiveFile(Directory &parent, const char *name,
ArchiveFile
*
file
;
try
{
file
=
archive_file_open
(
&
plugin
,
path_fs
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
if
(
directory
!=
nullptr
)
editor
.
LockDeleteDirectory
(
directory
);
return
;
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Container.cxx
View file @
914df18b
...
...
@@ -119,9 +119,9 @@ UpdateWalk::UpdateContainerFile(Directory &directory,
modified
=
true
;
}
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(...)
{
LogError
(
std
::
current_exception
());
editor
.
LockDeleteDirectory
(
contdir
);
LogError
(
e
);
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/db/update/ExcludeList.cxx
View file @
914df18b
...
...
@@ -31,7 +31,7 @@
#include "util/StringStrip.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
#include <string.h>
...
...
@@ -62,8 +62,8 @@ try {
if
(
!
IsFileNotFound
(
e
))
LogError
(
e
);
return
false
;
}
catch
(
const
std
::
exception
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
false
;
}
...
...
@@ -85,7 +85,7 @@ ExcludeList::Check(Path name_fs) const noexcept
try
{
if
(
i
.
Check
(
NarrowPath
(
name_fs
).
c_str
()))
return
true
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
#else
...
...
This diff is collapsed.
Click to expand it.
src/db/update/InotifyUpdate.cxx
View file @
914df18b
...
...
@@ -187,8 +187,8 @@ recursive_watch_subdirectories(WatchDirectory *directory,
FileInfo
fi
;
try
{
fi
=
FileInfo
(
child_path_fs
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
continue
;
}
...
...
@@ -198,8 +198,8 @@ recursive_watch_subdirectories(WatchDirectory *directory,
try
{
ret
=
inotify_source
->
Add
(
child_path_fs
.
c_str
(),
IN_MASK
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
}
catch
(
...
)
{
FormatError
(
std
::
current_exception
()
,
"Failed to register %s"
,
child_path_fs
.
c_str
());
continue
;
...
...
@@ -302,8 +302,8 @@ mpd_inotify_init(EventLoop &loop, Storage &storage, UpdateService &update,
inotify_source
=
new
InotifySource
(
loop
,
mpd_inotify_callback
,
nullptr
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
;
}
...
...
@@ -312,8 +312,8 @@ mpd_inotify_init(EventLoop &loop, Storage &storage, UpdateService &update,
int
descriptor
;
try
{
descriptor
=
inotify_source
->
Add
(
path
.
c_str
(),
IN_MASK
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
delete
inotify_source
;
inotify_source
=
nullptr
;
return
;
...
...
This diff is collapsed.
Click to expand it.
src/db/update/UpdateIO.cxx
View file @
914df18b
...
...
@@ -36,8 +36,8 @@ GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info) noexcept
try
{
info
=
storage
.
GetInfo
(
uri_utf8
,
true
);
return
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
false
;
}
...
...
@@ -46,8 +46,8 @@ GetInfo(StorageDirectoryReader &reader, StorageFileInfo &info) noexcept
try
{
info
=
reader
.
GetInfo
(
true
);
return
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
false
;
}
...
...
@@ -58,7 +58,7 @@ DirectoryExists(Storage &storage, const Directory &directory) noexcept
try
{
info
=
storage
.
GetInfo
(
directory
.
GetPath
(),
true
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
@@ -83,7 +83,7 @@ directory_child_is_regular(Storage &storage, const Directory &directory,
try
{
return
GetDirectoryChildInfo
(
storage
,
directory
,
name_utf8
)
.
IsRegular
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Walk.cxx
View file @
914df18b
...
...
@@ -338,8 +338,8 @@ UpdateWalk::UpdateDirectory(Directory &directory,
try
{
reader
.
reset
(
storage
.
OpenDirectory
(
directory
.
GetPath
()));
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/Bridge.cxx
View file @
914df18b
...
...
@@ -416,7 +416,7 @@ try {
assert
(
nbytes
>
0
||
is
.
IsEOF
());
return
nbytes
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
error
=
std
::
current_exception
();
return
0
;
}
...
...
@@ -471,7 +471,7 @@ DecoderBridge::SubmitData(InputStream *is,
auto
result
=
convert
->
Convert
({
data
,
length
});
data
=
result
.
data
;
length
=
result
.
size
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
/* the PCM conversion has failed - stop
playback, since we have no better way to
bail out */
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderAPI.cxx
View file @
914df18b
...
...
@@ -37,8 +37,8 @@ decoder_read(DecoderClient *client,
try
{
return
is
.
LockRead
(
buffer
,
length
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderThread.cxx
View file @
914df18b
...
...
@@ -112,7 +112,7 @@ decoder_stream_decode(const DecoderPlugin &plugin,
/* rewind the stream, so each plugin gets a fresh start */
try
{
input_stream
.
Rewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
{
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/AudiofileDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -30,7 +30,7 @@
#include <audiofile.h>
#include <af_vfs.h>
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
#include <stdio.h>
...
...
@@ -120,8 +120,8 @@ audiofile_file_seek(AFvirtualfile *vfile, AFfileoffset _offset,
try
{
is
.
LockSeek
(
offset
);
return
is
.
GetOffset
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
,
"Seek failed"
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
,
"Seek failed"
);
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/DsdLib.cxx
View file @
914df18b
...
...
@@ -57,7 +57,7 @@ dsdlib_skip_to(DecoderClient *client, InputStream &is,
if
(
is
.
IsSeekable
())
{
try
{
is
.
LockSeek
(
offset
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
}
...
...
@@ -81,7 +81,7 @@ dsdlib_skip(DecoderClient *client, InputStream &is,
if
(
is
.
IsSeekable
())
{
try
{
is
.
LockSeek
(
is
.
GetOffset
()
+
delta
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FaadDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -31,7 +31,7 @@
#include <neaacdec.h>
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
#include <string.h>
...
...
@@ -196,7 +196,7 @@ faad_song_duration(DecoderBuffer &buffer, InputStream &is)
try
{
is
.
LockSeek
(
tagsize
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
buffer
.
Clear
();
...
...
@@ -316,7 +316,7 @@ faad_get_file_time(InputStream &is)
try
{
faad_decoder_init
(
decoder
,
buffer
,
audio_format
);
recognized
=
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -483,7 +483,7 @@ ffmpeg_probe(DecoderClient *client, InputStream &is)
try
{
is
.
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -814,8 +814,8 @@ ffmpeg_decode(DecoderClient &client, InputStream &input)
try
{
format_context
=
FfmpegOpenInput
(
stream
.
io
,
input
.
GetURI
(),
input_format
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
;
}
...
...
@@ -869,7 +869,7 @@ ffmpeg_scan_stream(InputStream &is,
AVFormatContext
*
f
;
try
{
f
=
FfmpegOpenInput
(
stream
.
io
,
is
.
GetURI
(),
input_format
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FfmpegIo.cxx
View file @
914df18b
...
...
@@ -25,7 +25,7 @@
#include "../DecoderAPI.hxx"
#include "input/InputStream.hxx"
#include <
stdexcept
>
#include <
exception
>
AvioStream
::~
AvioStream
()
{
...
...
@@ -72,7 +72,7 @@ AvioStream::Seek(int64_t pos, int whence)
try
{
input
.
LockSeek
(
pos
);
return
input
.
GetOffset
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FlacCommon.cxx
View file @
914df18b
...
...
@@ -27,7 +27,7 @@
#include "util/ConstBuffer.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
bool
FlacDecoder
::
Initialize
(
unsigned
sample_rate
,
unsigned
bits_per_sample
,
...
...
@@ -39,8 +39,8 @@ FlacDecoder::Initialize(unsigned sample_rate, unsigned bits_per_sample,
try
{
pcm_import
.
Open
(
sample_rate
,
bits_per_sample
,
channels
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
unsupported
=
true
;
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FlacDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -330,7 +330,7 @@ oggflac_decode(DecoderClient &client, InputStream &input_stream)
moved it */
try
{
input_stream
.
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
flac_decode_internal
(
client
,
input_stream
,
true
);
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FlacIOHandle.cxx
View file @
914df18b
...
...
@@ -55,7 +55,7 @@ FlacIORead(void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle)
:
EINVAL
;
return
0
;
#endif
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
/* just some random non-zero errno value */
errno
=
EINVAL
;
return
0
;
...
...
@@ -96,8 +96,8 @@ FlacIOSeek(FLAC__IOHandle handle, FLAC__int64 _offset, int whence)
try
{
is
->
LockSeek
(
offset
);
return
0
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FlacInput.cxx
View file @
914df18b
...
...
@@ -25,7 +25,7 @@
#include "Log.hxx"
#include "Compiler.h"
#include <
stdexcept
>
#include <
exception
>
FLAC__StreamDecoderReadStatus
FlacInput
::
Read
(
FLAC__byte
buffer
[],
size_t
*
bytes
)
...
...
@@ -54,8 +54,8 @@ FlacInput::Seek(FLAC__uint64 absolute_byte_offset)
try
{
input_stream
.
LockSeek
(
absolute_byte_offset
);
return
FLAC__STREAM_DECODER_SEEK_STATUS_OK
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
FLAC__STREAM_DECODER_SEEK_STATUS_ERROR
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -212,7 +212,7 @@ MadDecoder::Seek(long offset)
{
try
{
input_stream
.
LockSeek
(
offset
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/MpcdecDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -32,7 +32,7 @@
#include <mpc/mpcdec.h>
#include <
stdexcept
>
#include <
exception
>
#include <math.h>
...
...
@@ -67,7 +67,7 @@ mpc_seek_cb(mpc_reader *reader, mpc_int32_t offset)
try
{
data
->
is
.
LockSeek
(
offset
);
return
true
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/OggDecoder.cxx
View file @
914df18b
...
...
@@ -22,7 +22,7 @@
#include "lib/xiph/OggFind.hxx"
#include "input/InputStream.hxx"
#include <
stdexcept
>
#include <
exception
>
/**
* Load the end-of-stream packet and restore the previous file
...
...
@@ -55,7 +55,7 @@ OggDecoder::LoadEndPacket(ogg_packet &packet) const
/* restore the previous file position */
try
{
input_stream
.
LockSeek
(
old_offset
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
return
result
;
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -261,7 +261,7 @@ MPDOpusDecoder::Seek(uint64_t where_frame)
try
{
SeekGranulePos
(
where_granulepos
);
return
true
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
}
...
...
@@ -277,7 +277,7 @@ mpd_opus_stream_decode(DecoderClient &client,
moved it */
try
{
input_stream
.
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
DecoderReader
reader
(
client
,
input_stream
);
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/PcmDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -31,7 +31,7 @@
#include "util/MimeType.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
#include <string.h>
...
...
@@ -105,8 +105,8 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
try
{
CheckSampleRate
(
value
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
;
}
...
...
@@ -127,8 +127,8 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
try
{
CheckChannelCount
(
value
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
;
}
...
...
@@ -196,8 +196,8 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
is
.
LockSeek
(
offset
);
buffer
.
Clear
();
client
.
CommandFinished
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
client
.
SeekError
();
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/SndfileDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -26,7 +26,7 @@
#include "util/Domain.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <sndfile.h>
...
...
@@ -93,8 +93,8 @@ sndfile_vio_seek(sf_count_t _offset, int whence, void *user_data)
try
{
is
.
LockSeek
(
offset
);
return
is
.
GetOffset
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
,
"Seek failed"
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
,
"Seek failed"
);
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/VorbisDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -129,7 +129,7 @@ VorbisDecoder::Seek(uint64_t where_frame)
SeekGranulePos
(
where_granulepos
);
vorbis_synthesis_restart
(
&
dsp
);
return
true
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
}
...
...
@@ -323,7 +323,7 @@ vorbis_stream_decode(DecoderClient &client,
moved it */
try
{
input_stream
.
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
DecoderReader
reader
(
client
,
input_stream
);
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
914df18b
...
...
@@ -295,7 +295,7 @@ struct WavpackInput {
try
{
is
.
LockSeek
(
pos
);
return
0
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
-
1
;
}
}
...
...
@@ -520,7 +520,7 @@ wavpack_open_wvc(DecoderClient &client, const char *uri)
try
{
return
client
.
OpenUri
(
uri
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/event/ServerSocket.cxx
View file @
914df18b
...
...
@@ -220,11 +220,11 @@ ServerSocket::Open()
try
{
i
.
Open
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
if
(
good
!=
nullptr
&&
good
->
GetSerial
()
==
i
.
GetSerial
())
{
const
auto
address_string
=
i
.
ToString
();
const
auto
good_string
=
good
->
ToString
();
FormatError
(
e
,
FormatError
(
std
::
current_exception
()
,
"bind to '%s' failed "
"(continuing anyway, because "
"binding to '%s' succeeded)"
,
...
...
This diff is collapsed.
Click to expand it.
src/filter/plugins/ReplayGainFilterPlugin.cxx
View file @
914df18b
...
...
@@ -29,7 +29,7 @@
#include "util/Domain.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
...
...
@@ -163,8 +163,9 @@ ReplayGainFilter::Update()
try
{
mixer_set_volume
(
mixer
,
_volume
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
,
"Failed to update hardware mixer"
);
}
catch
(...)
{
LogError
(
std
::
current_exception
(),
"Failed to update hardware mixer"
);
}
}
else
pv
.
SetVolume
(
volume
);
...
...
This diff is collapsed.
Click to expand it.
src/fs/AllocatedPath.cxx
View file @
914df18b
...
...
@@ -23,7 +23,7 @@
#include "Charset.hxx"
#include "Compiler.h"
#include <
stdexcept
>
#include <
exception
>
/* no inlining, please */
AllocatedPath
::~
AllocatedPath
()
{}
...
...
@@ -34,7 +34,7 @@ AllocatedPath::FromUTF8(const char *path_utf8) noexcept
#if defined(HAVE_FS_CHARSET) || defined(_WIN32)
try
{
return
AllocatedPath
(
::
PathFromUTF8
(
path_utf8
));
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
#else
...
...
@@ -63,7 +63,7 @@ AllocatedPath::ToUTF8() const noexcept
{
try
{
return
::
PathToUTF8
(
c_str
());
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
std
::
string
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/fs/CheckFile.cxx
View file @
914df18b
...
...
@@ -62,6 +62,6 @@ try {
"No permission to read directory: %s"
,
path_fs
.
ToUTF8
().
c_str
());
}
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
}
This diff is collapsed.
Click to expand it.
src/fs/Path.cxx
View file @
914df18b
...
...
@@ -21,14 +21,12 @@
#include "Path.hxx"
#include "Charset.hxx"
#include <stdexcept>
std
::
string
Path
::
ToUTF8
()
const
noexcept
{
try
{
return
::
PathToUTF8
(
c_str
());
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
std
::
string
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/input/Init.cxx
View file @
914df18b
...
...
@@ -62,7 +62,7 @@ input_stream_global_init(EventLoop &event_loop)
"Input plugin '%s' is unavailable"
,
plugin
->
name
);
continue
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to initialize input plugin '%s'"
,
plugin
->
name
));
}
...
...
This diff is collapsed.
Click to expand it.
src/input/TextInputStream.cxx
View file @
914df18b
...
...
@@ -63,8 +63,8 @@ TextInputStream::ReadLine()
try
{
nbytes
=
is
->
LockRead
(
dest
.
data
,
dest
.
size
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
nullptr
;
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/icu/CaseFold.cxx
View file @
914df18b
...
...
@@ -42,7 +42,6 @@
#endif
#include <memory>
#include <stdexcept>
#include <assert.h>
#include <string.h>
...
...
@@ -95,7 +94,7 @@ try {
#else
#error not implemented
#endif
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
AllocatedString
<>::
Duplicate
(
src
);
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/icu/Collate.cxx
View file @
914df18b
...
...
@@ -97,7 +97,7 @@ IcuCollate(const char *a, const char *b) noexcept
return
ucol_strcoll
(
collator
,
au
.
begin
(),
au
.
size
(),
bu
.
begin
(),
bu
.
size
());
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
/* fall back to plain strcasecmp() */
return
strcasecmp
(
a
,
b
);
}
...
...
@@ -108,18 +108,18 @@ IcuCollate(const char *a, const char *b) noexcept
try
{
wa
=
MultiByteToWideChar
(
CP_UTF8
,
a
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
try
{
wb
=
MultiByteToWideChar
(
CP_UTF8
,
b
);
return
-
1
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
0
;
}
}
try
{
wb
=
MultiByteToWideChar
(
CP_UTF8
,
b
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/xiph/OggFind.cxx
View file @
914df18b
...
...
@@ -22,8 +22,6 @@
#include "lib/xiph/OggSyncState.hxx"
#include "input/InputStream.hxx"
#include <stdexcept>
bool
OggFindEOS
(
OggSyncState
&
oy
,
ogg_stream_state
&
os
,
ogg_packet
&
packet
)
{
...
...
@@ -51,7 +49,7 @@ OggSeekPageAtOffset(OggSyncState &oy, ogg_stream_state &os, InputStream &is,
try
{
is
.
LockSeek
(
offset
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/mixer/MixerAll.cxx
View file @
914df18b
...
...
@@ -43,8 +43,8 @@ output_mixer_get_volume(const AudioOutputControl &ao) noexcept
try
{
return
mixer_get_volume
(
mixer
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
}
catch
(
...
)
{
FormatError
(
std
::
current_exception
()
,
"Failed to read mixer for '%s'"
,
ao
.
GetName
());
return
-
1
;
...
...
@@ -86,8 +86,8 @@ output_mixer_set_volume(AudioOutputControl &ao, unsigned volume) noexcept
try
{
mixer_set_volume
(
mixer
,
volume
);
return
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
}
catch
(
...
)
{
FormatError
(
std
::
current_exception
()
,
"Failed to set mixer for '%s'"
,
ao
.
GetName
());
return
false
;
...
...
This diff is collapsed.
Click to expand it.
src/mixer/plugins/AlsaMixerPlugin.cxx
View file @
914df18b
...
...
@@ -149,7 +149,7 @@ alsa_mixer_elem_callback(snd_mixer_elem_t *elem, unsigned mask)
try
{
int
volume
=
mixer
.
GetVolume
();
mixer
.
listener
.
OnMixerVolumeChanged
(
mixer
,
volume
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
...
...
This diff is collapsed.
Click to expand it.
src/neighbor/plugins/UpnpNeighborPlugin.cxx
View file @
914df18b
...
...
@@ -104,8 +104,8 @@ UpnpNeighborExplorer::GetList() const noexcept
try
{
tmp
=
discovery
->
GetDirectories
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
}
List
result
;
...
...
This diff is collapsed.
Click to expand it.
src/output/Control.cxx
View file @
914df18b
...
...
@@ -205,8 +205,9 @@ AudioOutputControl::Open(const AudioFormat audio_format,
if
(
open2
&&
output
->
mixer
!=
nullptr
)
{
try
{
mixer_open
(
output
->
mixer
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
"Failed to open mixer for '%s'"
,
}
catch
(...)
{
FormatError
(
std
::
current_exception
(),
"Failed to open mixer for '%s'"
,
GetName
());
}
}
...
...
This diff is collapsed.
Click to expand it.
src/output/Filtered.cxx
View file @
914df18b
...
...
@@ -45,7 +45,7 @@ FilteredAudioOutput::Enable()
{
try
{
output
->
Enable
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to enable output %s"
,
GetLogName
()));
}
...
...
@@ -62,7 +62,7 @@ FilteredAudioOutput::ConfigureConvertFilter()
{
try
{
convert_filter_set
(
convert_filter
.
Get
(),
out_audio_format
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to convert for %s"
,
GetLogName
()));
}
...
...
@@ -75,7 +75,7 @@ FilteredAudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
try
{
output
->
Open
(
out_audio_format
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to open %s"
,
GetLogName
()));
}
...
...
@@ -87,7 +87,7 @@ FilteredAudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
try
{
ConfigureConvertFilter
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
output
->
Close
();
if
(
out_audio_format
.
format
==
SampleFormat
::
DSD
)
{
...
...
@@ -97,7 +97,7 @@ FilteredAudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
implemented; our last resort is to give up
DSD and fall back to PCM */
LogError
(
e
);
LogError
(
std
::
current_exception
()
);
FormatError
(
output_domain
,
"Retrying without DSD"
);
desired_audio_format
.
format
=
SampleFormat
::
FLOAT
;
...
...
@@ -184,8 +184,8 @@ FilteredAudioOutput::IteratePause() noexcept
{
try
{
return
output
->
Pause
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
"Failed to pause %s"
,
}
catch
(
...
)
{
FormatError
(
std
::
current_exception
()
,
"Failed to pause %s"
,
GetLogName
());
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/output/Init.cxx
View file @
914df18b
...
...
@@ -186,11 +186,11 @@ FilteredAudioOutput::Configure(const ConfigBlock &block)
try
{
filter_chain_parse
(
*
prepared_filter
,
block
.
GetBlockValue
(
AUDIO_FILTERS
,
""
));
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
/* It's not really fatal - Part of the filter chain
has been set up already and even an empty one will
work (if only with unexpected behaviour) */
FormatError
(
e
,
FormatError
(
std
::
current_exception
()
,
"Failed to initialize filter chain for '%s'"
,
name
);
}
...
...
@@ -232,8 +232,8 @@ FilteredAudioOutput::Setup(EventLoop &event_loop,
mixer_plugin
,
*
prepared_filter
,
mixer_listener
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
}
catch
(
...
)
{
FormatError
(
std
::
current_exception
()
,
"Failed to initialize hardware mixer for '%s'"
,
name
);
}
...
...
This diff is collapsed.
Click to expand it.
src/output/MultipleOutputs.cxx
View file @
914df18b
...
...
@@ -57,7 +57,7 @@ LoadOutput(EventLoop &event_loop,
try
{
return
audio_output_new
(
event_loop
,
replay_gain_config
,
block
,
mixer_listener
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
if
(
block
.
line
>
0
)
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to configure output in line %i"
,
block
.
line
));
...
...
This diff is collapsed.
Click to expand it.
src/output/Thread.cxx
View file @
914df18b
...
...
@@ -72,7 +72,7 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
try
{
output
->
ConfigureConvertFilter
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
open
=
false
;
{
...
...
@@ -107,8 +107,8 @@ AudioOutputControl::InternalEnable() noexcept
really_enabled
=
true
;
return
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
fail_timer
.
Update
();
last_error
=
std
::
current_exception
();
return
false
;
...
...
@@ -149,7 +149,7 @@ AudioOutputControl::InternalOpen(const AudioFormat in_audio_format,
output
->
prepared_replay_gain_filter
,
output
->
prepared_other_replay_gain_filter
,
output
->
prepared_filter
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to open filter for %s"
,
GetLogName
()));
}
...
...
@@ -160,8 +160,8 @@ AudioOutputControl::InternalOpen(const AudioFormat in_audio_format,
source
.
Close
();
throw
;
}
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
fail_timer
.
Update
();
last_error
=
std
::
current_exception
();
}
...
...
@@ -231,8 +231,9 @@ bool
AudioOutputControl
::
FillSourceOrClose
()
try
{
return
source
.
Fill
(
mutex
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
"Failed to filter for %s"
,
GetLogName
());
}
catch
(...)
{
FormatError
(
std
::
current_exception
(),
"Failed to filter for %s"
,
GetLogName
());
InternalClose
(
false
);
...
...
@@ -251,8 +252,9 @@ AudioOutputControl::PlayChunk() noexcept
const
ScopeUnlock
unlock
(
mutex
);
try
{
output
->
SendTag
(
*
tag
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
"Failed to send tag to %s"
,
}
catch
(...)
{
FormatError
(
std
::
current_exception
(),
"Failed to send tag to %s"
,
GetLogName
());
}
}
...
...
@@ -273,8 +275,9 @@ AudioOutputControl::PlayChunk() noexcept
const
ScopeUnlock
unlock
(
mutex
);
nbytes
=
output
->
Play
(
data
.
data
,
data
.
size
);
assert
(
nbytes
<=
data
.
size
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
FormatError
(
e
,
"Failed to play on %s"
,
GetLogName
());
}
catch
(...)
{
FormatError
(
std
::
current_exception
(),
"Failed to play on %s"
,
GetLogName
());
nbytes
=
0
;
}
...
...
@@ -382,8 +385,8 @@ AudioOutputControl::Task()
try
{
SetThreadRealtime
();
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
,
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
,
"OutputThread could not get realtime scheduling, continuing anyway"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
914df18b
...
...
@@ -875,7 +875,7 @@ try {
call */
return
;
}
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
MultiSocketMonitor
::
Reset
();
LockCaughtError
();
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/FifoOutputPlugin.cxx
View file @
914df18b
...
...
@@ -92,8 +92,8 @@ FifoOutput::Delete()
try
{
RemoveFile
(
path
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
,
"Could not remove FIFO"
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
,
"Could not remove FIFO"
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/PulseOutputPlugin.cxx
View file @
914df18b
...
...
@@ -856,7 +856,7 @@ try {
PulseOutput
po
(
empty
);
po
.
WaitConnection
();
return
true
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/RecorderOutputPlugin.cxx
View file @
914df18b
...
...
@@ -154,7 +154,7 @@ RecorderOutput::Open(AudioFormat &audio_format)
try
{
encoder
=
prepared_encoder
->
Open
(
audio_format
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
delete
file
;
throw
;
}
...
...
@@ -162,7 +162,7 @@ RecorderOutput::Open(AudioFormat &audio_format)
if
(
!
HasDynamicPath
())
{
try
{
EncoderToFile
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
delete
encoder
;
throw
;
}
...
...
@@ -218,8 +218,8 @@ RecorderOutput::Close() noexcept
try
{
Commit
();
}
catch
(
const
std
::
exception
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
}
if
(
HasDynamicPath
())
{
...
...
@@ -238,8 +238,8 @@ RecorderOutput::FinishFormat()
try
{
Commit
();
}
catch
(
const
std
::
exception
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
}
file
=
nullptr
;
...
...
@@ -270,7 +270,7 @@ RecorderOutput::ReopenFormat(AllocatedPath &&new_path)
try
{
EncoderToOutputStream
(
*
new_file
,
*
encoder
);
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
...
)
{
delete
encoder
;
delete
new_file
;
throw
;
...
...
@@ -302,8 +302,8 @@ RecorderOutput::SendTag(const Tag &tag)
try
{
new_path
=
ParsePath
(
p
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
FinishFormat
();
return
;
}
...
...
@@ -313,8 +313,8 @@ RecorderOutput::SendTag(const Tag &tag)
try
{
ReopenFormat
(
std
::
move
(
new_path
));
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/ShoutOutputPlugin.cxx
View file @
914df18b
...
...
@@ -251,7 +251,7 @@ ShoutOutput::Close() noexcept
try
{
encoder
->
End
();
WritePage
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
/* ignore */
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
914df18b
...
...
@@ -179,7 +179,7 @@ HttpdOutput::ReadPage()
buffer underruns */
try
{
encoder
->
Flush
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
/* ignore */
}
...
...
@@ -376,7 +376,7 @@ HttpdOutput::SendTag(const Tag &tag)
try
{
encoder
->
PreTag
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
/* ignore */
}
...
...
@@ -388,7 +388,7 @@ HttpdOutput::SendTag(const Tag &tag)
try
{
encoder
->
SendTag
(
tag
);
encoder
->
Flush
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
/* ignore */
}
...
...
This diff is collapsed.
Click to expand it.
src/player/Thread.cxx
View file @
914df18b
...
...
@@ -37,7 +37,7 @@
#include "thread/Name.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <string.h>
...
...
@@ -462,8 +462,8 @@ Player::OpenOutput()
try
{
const
ScopeUnlock
unlock
(
pc
.
mutex
);
pc
.
outputs
.
Open
(
play_audio_format
,
buffer
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
output_open
=
false
;
...
...
@@ -564,8 +564,8 @@ Player::SendSilence()
try
{
pc
.
outputs
.
Play
(
chunk
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
buffer
.
Return
(
chunk
);
return
false
;
}
...
...
@@ -896,8 +896,8 @@ Player::PlayNextChunk()
try
{
play_chunk
(
pc
,
*
song
,
chunk
,
buffer
,
play_audio_format
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
buffer
.
Return
(
chunk
);
...
...
This diff is collapsed.
Click to expand it.
src/playlist/PlaylistRegistry.cxx
View file @
914df18b
...
...
@@ -38,8 +38,6 @@
#include "config/ConfigGlobal.hxx"
#include "config/Block.hxx"
#include <stdexcept>
#include <assert.h>
#include <string.h>
...
...
@@ -196,7 +194,7 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, const char *mime)
fresh start */
try
{
is
->
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
auto
playlist
=
playlist_plugin_open_stream
(
plugin
,
...
...
@@ -240,7 +238,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix)
fresh start */
try
{
is
->
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
auto
playlist
=
playlist_plugin_open_stream
(
plugin
,
...
...
This diff is collapsed.
Click to expand it.
src/playlist/PlaylistSong.cxx
View file @
914df18b
...
...
@@ -26,8 +26,6 @@
#include "util/UriUtil.hxx"
#include "DetachedSong.hxx"
#include <stdexcept>
#include <string.h>
static
void
...
...
@@ -53,7 +51,7 @@ try {
merge_song_metadata
(
song
,
tmp
);
return
true
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/playlist/PlaylistStream.cxx
View file @
914df18b
...
...
@@ -26,7 +26,7 @@
#include "fs/Path.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
#include <assert.h>
...
...
@@ -46,8 +46,8 @@ try {
auto
is
=
OpenLocalInputStream
(
path
,
mutex
,
cond
);
return
playlist_list_open_stream_suffix
(
std
::
move
(
is
),
suffix_utf8
.
c_str
());
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
nullptr
;
}
...
...
@@ -64,8 +64,8 @@ try {
playlist
=
playlist_open_path_suffix
(
path
,
mutex
,
cond
);
return
playlist
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
nullptr
;
}
...
...
@@ -80,7 +80,7 @@ try {
auto
is
=
InputStream
::
OpenReady
(
uri
,
mutex
,
cond
);
return
playlist_list_open_stream
(
std
::
move
(
is
),
uri
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
nullptr
;
}
This diff is collapsed.
Click to expand it.
src/queue/PlaylistUpdate.cxx
View file @
914df18b
...
...
@@ -23,8 +23,6 @@
#include "db/LightSong.hxx"
#include "DetachedSong.hxx"
#include <stdexcept>
static
bool
UpdatePlaylistSong
(
const
Database
&
db
,
DetachedSong
&
song
)
{
...
...
@@ -36,7 +34,7 @@ UpdatePlaylistSong(const Database &db, DetachedSong &song)
const
LightSong
*
original
;
try
{
original
=
db
.
GetSong
(
song
.
GetURI
());
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
/* not found - shouldn't happen, because the update
thread should ensure that all stale Song instances
have been purged */
...
...
This diff is collapsed.
Click to expand it.
src/queue/QueueSave.cxx
View file @
914df18b
...
...
@@ -29,6 +29,8 @@
#include "util/StringCompare.hxx"
#include "Log.hxx"
#include <exception>
#include <stdlib.h>
#define PRIO_LABEL "Prio: "
...
...
@@ -96,8 +98,8 @@ queue_load_song(TextFile &file, const SongLoader &loader,
try
{
song
=
song_load
(
file
,
uri
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
;
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/sticker/SongSticker.cxx
View file @
914df18b
...
...
@@ -25,8 +25,6 @@
#include "util/Alloc.hxx"
#include "util/ScopeExit.hxx"
#include <stdexcept>
#include <string.h>
#include <stdlib.h>
...
...
@@ -96,7 +94,7 @@ sticker_song_find_cb(const char *uri, const char *value, void *user_data)
const
LightSong
*
song
=
db
->
GetSong
(
uri
);
data
->
func
(
*
song
,
value
,
data
->
user_data
);
db
->
ReturnSong
(
song
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
}
}
...
...
This diff is collapsed.
Click to expand it.
src/storage/CompositeStorage.cxx
View file @
914df18b
...
...
@@ -299,7 +299,7 @@ CompositeStorage::OpenDirectory(const char *uri)
try
{
other
=
f
.
directory
->
storage
->
OpenDirectory
(
f
.
uri
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
return
new
CompositeDirectoryReader
(
other
,
directory
->
children
);
...
...
This diff is collapsed.
Click to expand it.
src/storage/plugins/CurlStorage.cxx
View file @
914df18b
...
...
@@ -194,7 +194,7 @@ ParseTimeStamp(const char *s)
try
{
// TODO: make this more robust
return
ParseTimePoint
(
s
,
"%a, %d %b %Y %T %Z"
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
std
::
chrono
::
system_clock
::
time_point
::
min
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/storage/plugins/LocalStorage.cxx
View file @
914df18b
...
...
@@ -123,7 +123,7 @@ LocalStorage::MapFS(const char *uri_utf8) const noexcept
{
try
{
return
MapFSOrThrow
(
uri_utf8
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
AllocatedPath
::
Null
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/tag/ApeLoader.cxx
View file @
914df18b
...
...
@@ -24,7 +24,6 @@
#include "util/StringView.hxx"
#include <memory>
#include <stdexcept>
#include <stdint.h>
#include <assert.h>
...
...
@@ -104,6 +103,6 @@ try {
}
return
true
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
This diff is collapsed.
Click to expand it.
src/tag/Generic.cxx
View file @
914df18b
...
...
@@ -28,7 +28,7 @@
#include "input/LocalOpen.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
bool
ScanGenericTags
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
ctx
)
...
...
@@ -39,7 +39,7 @@ ScanGenericTags(InputStream &is, const TagHandler &handler, void *ctx)
#ifdef ENABLE_ID3TAG
try
{
is
.
LockRewind
();
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
false
;
}
...
...
@@ -57,7 +57,7 @@ try {
auto
is
=
OpenLocalInputStream
(
path
,
mutex
,
cond
);
return
ScanGenericTags
(
*
is
,
handler
,
ctx
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
false
;
}
This diff is collapsed.
Click to expand it.
src/tag/Id3Load.cxx
View file @
914df18b
...
...
@@ -27,7 +27,6 @@
#include <id3tag.h>
#include <algorithm>
#include <stdexcept>
static
constexpr
size_t
ID3V1_SIZE
=
128
;
...
...
@@ -46,7 +45,7 @@ try {
is
.
ReadFull
(
buf
,
sizeof
(
buf
));
return
id3_tag_query
(
buf
,
sizeof
(
buf
));
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
0
;
}
...
...
@@ -77,7 +76,7 @@ try {
is
.
ReadFull
(
end
,
remaining
);
return
UniqueId3Tag
(
id3_tag_parse
(
tag_buffer
.
get
(),
tag_size
));
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -87,7 +86,7 @@ try {
is
.
Seek
(
offset
);
return
ReadId3Tag
(
is
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -98,7 +97,7 @@ try {
is
.
ReadFull
(
buffer
,
ID3V1_SIZE
);
return
UniqueId3Tag
(
id3_tag_parse
(
buffer
,
ID3V1_SIZE
));
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -107,7 +106,7 @@ ReadId3v1Tag(InputStream &is, offset_type offset)
try
{
is
.
Seek
(
offset
);
return
ReadId3v1Tag
(
is
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -140,7 +139,7 @@ try {
}
return
tag
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -181,7 +180,7 @@ try {
/* We have an id3v2 tag, so ditch v1tag */
return
tag
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -191,7 +190,7 @@ try {
size_t
size
;
try
{
size
=
riff_seek_id3
(
is
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
size
=
aiff_seek_id3
(
is
);
}
...
...
@@ -203,7 +202,7 @@ try {
is
.
ReadFull
(
buffer
.
get
(),
size
);
return
UniqueId3Tag
(
id3_tag_parse
(
buffer
.
get
(),
size
));
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
...
...
@@ -220,6 +219,6 @@ try {
}
return
tag
;
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
return
nullptr
;
}
This diff is collapsed.
Click to expand it.
src/tag/Id3Scan.cxx
View file @
914df18b
...
...
@@ -32,7 +32,7 @@
#include <id3tag.h>
#include <string>
#include <
stdexcept
>
#include <
exception
>
#include <string.h>
#include <stdlib.h>
...
...
@@ -349,8 +349,8 @@ tag_id3_scan(InputStream &is,
tag
=
tag_id3_load
(
is
);
if
(
!
tag
)
return
false
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
test/FakeDecoderAPI.cxx
View file @
914df18b
...
...
@@ -24,8 +24,6 @@
#include "util/StringBuffer.hxx"
#include "Compiler.h"
#include <stdexcept>
#include <unistd.h>
#include <stdio.h>
...
...
@@ -83,7 +81,7 @@ FakeDecoder::Read(InputStream &is, void *buffer, size_t length)
{
try
{
return
is
.
LockRead
(
buffer
,
length
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
...
)
{
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
test/TestIcu.cxx
View file @
914df18b
...
...
@@ -43,7 +43,7 @@ public:
try
{
IcuConverter
::
Create
(
"doesntexist"
);
CPPUNIT_FAIL
(
"Exception expected"
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
...
...
@@ -56,7 +56,7 @@ public:
try
{
auto
f
=
converter
->
FromUTF8
(
i
);
CPPUNIT_FAIL
(
"Exception expected"
);
}
catch
(
const
std
::
runtime_error
&
)
{
}
catch
(
...
)
{
}
}
...
...
This diff is collapsed.
Click to expand it.
test/run_inotify.cxx
View file @
914df18b
...
...
@@ -23,6 +23,8 @@
#include "event/Loop.hxx"
#include "Log.hxx"
#include <exception>
#include <sys/inotify.h>
static
constexpr
unsigned
IN_MASK
=
...
...
@@ -59,7 +61,7 @@ try {
event_loop
.
Run
();
return
EXIT_SUCCESS
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
EXIT_FAILURE
;
}
This diff is collapsed.
Click to expand it.
test/run_resolver.cxx
View file @
914df18b
...
...
@@ -23,7 +23,7 @@
#include "net/SocketAddress.hxx"
#include "Log.hxx"
#include <
stdexcept
>
#include <
exception
>
#ifdef _WIN32
#include <ws2tcpip.h>
...
...
@@ -53,7 +53,7 @@ try {
freeaddrinfo
(
ai
);
return
EXIT_SUCCESS
;
}
catch
(
const
std
::
runtime_error
&
e
)
{
LogError
(
e
);
}
catch
(
...
)
{
LogError
(
std
::
current_exception
()
);
return
EXIT_FAILURE
;
}
This diff is collapsed.
Click to expand it.
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