forked from auracaster/bumble_mirror
better error message
This commit is contained in:
+2
-2
@@ -675,7 +675,7 @@ async def run_receive(
|
|||||||
try:
|
try:
|
||||||
if not audio_io.check_audio_output(output):
|
if not audio_io.check_audio_output(output):
|
||||||
return
|
return
|
||||||
except (ValueError, ImportError, OSError) as error:
|
except ValueError as error:
|
||||||
print(error)
|
print(error)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -820,7 +820,7 @@ async def run_transmit(
|
|||||||
try:
|
try:
|
||||||
if not audio_io.check_audio_input(input):
|
if not audio_io.check_audio_input(input):
|
||||||
return
|
return
|
||||||
except (ValueError, ImportError, OSError) as error:
|
except ValueError as error:
|
||||||
print(error)
|
print(error)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -88,7 +88,9 @@ def check_audio_output(output: str) -> bool:
|
|||||||
) from exc
|
) from exc
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'audio output not available (sounddevice python module failed to load)'
|
'audio output not available '
|
||||||
|
'(sounddevice python module failed to load: '
|
||||||
|
f'{exc})'
|
||||||
) from exc
|
) from exc
|
||||||
|
|
||||||
if output == 'device':
|
if output == 'device':
|
||||||
@@ -303,7 +305,9 @@ def check_audio_input(input: str) -> bool:
|
|||||||
) from exc
|
) from exc
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'audio input not available (sounddevice python module failed to load)'
|
'audio input not available '
|
||||||
|
'(sounddevice python module failed to load: '
|
||||||
|
f'{exc})'
|
||||||
) from exc
|
) from exc
|
||||||
|
|
||||||
if input == 'device':
|
if input == 'device':
|
||||||
|
|||||||
Reference in New Issue
Block a user