Skip to content

Commit b231cce

Browse files
author
Clement Champetier
committed
FileProperties: not throw exception for functions which return string
1 parent ef7b3c0 commit b231cce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/AvTranscoder/mediaProperty/FileProperties.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ FileProperties::FileProperties( const FormatContext& formatContext )
2121
std::string FileProperties::getFilename() const
2222
{
2323
if( ! _formatContext || ! _formatContext->filename )
24-
throw std::runtime_error( "unknown format context" );
24+
return "unknown file name";
2525
return _formatContext->filename;
2626
}
2727

2828
std::string FileProperties::getFormatName() const
2929
{
3030
if( ! _formatContext || ! _formatContext->iformat || ! _formatContext->iformat->name )
31-
throw std::runtime_error( "unknown format context" );
31+
return "unknown format name";
3232
return _formatContext->iformat->name;
3333
}
3434

3535
std::string FileProperties::getFormatLongName() const
3636
{
3737
if( ! _formatContext || ! _formatContext->iformat || ! _formatContext->iformat->long_name )
38-
throw std::runtime_error( "unknown format context" );
38+
return "unknown format long name";
3939
return _formatContext->iformat->long_name;
4040
}
4141

0 commit comments

Comments
 (0)