Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit f394177

Browse files
committed
exceptions docs
1 parent 9562ac5 commit f394177

10 files changed

Lines changed: 23 additions & 6 deletions

docs/exceptions.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: flet_flashlight.exceptions.FlashlightDisableException
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: flet_flashlight.exceptions.FlashlightDisableExistentUserException
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: flet_flashlight.exceptions.FlashlightDisableNotAvailableException
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: flet_flashlight.exceptions.FlashlightEnableException
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: flet_flashlight.exceptions.FlashlightEnableExistentUserException
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: flet_flashlight.exceptions.FlashlightEnableNotAvailableException
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: flet_flashlight.exceptions.FlashlightException

mkdocs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ nav:
7676
- Getting Started: index.md
7777
- API Reference:
7878
- Flashlight: flashlight.md
79-
- Exceptions: exceptions.md
79+
- Exceptions:
80+
- FlashlightDisableException: exceptions/flashlight_disable_exception.md
81+
- FlashlightDisableExistentUserException: exceptions/flashlight_disable_existent_user_exception.md
82+
- FlashlightDisableNotAvailableException: exceptions/flashlight_disable_not_available_exception.md
83+
- FlashlightEnableExistentUserException: exceptions/flashlight_enable_existent_user_exception.md
84+
- FlashlightEnableException: exceptions/flashlight_enable_exception.md
85+
- FlashlightEnableNotAvailableException: exceptions/flashlight_enable_not_available_exception.md
86+
- FlashlightException: exceptions/flashlight_exception.md
8087
- Changelog: changelog.md
8188
- License: license.md
8289

src/flet_flashlight/exceptions.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ class FlashlightException(Exception):
44

55
class FlashlightEnableExistentUserException(FlashlightException):
66
"""
7-
Exception thrown when an attempt was made to turn on the torch but it was detected that the camera was being used by another process.
7+
Exception thrown when an attempt was made to turn on the torch
8+
but it was detected that the camera was being used by another process.
89
This means that the torch cannot be controlled.
910
"""
1011

1112

1213
class FlashlightEnableNotAvailableException(FlashlightException):
1314
"""
14-
Exception thrown when an attempt was made to turn on the torch but it was detected that the device does not have one equipped.
15+
Exception thrown when an attempt was made to turn on the torch
16+
but it was detected that the device does not have one equipped.
1517
"""
1618

1719

@@ -23,14 +25,16 @@ class FlashlightEnableException(FlashlightException):
2325

2426
class FlashlightDisableExistentUserException(FlashlightException):
2527
"""
26-
Exception thrown when an attempt was made to turn off the torch but it was detected that the camera was being used by another process.
28+
Exception thrown when an attempt was made to turn off the torch
29+
but it was detected that the camera was being used by another process.
2730
This means that the torch cannot be controlled.
2831
"""
2932

3033

3134
class FlashlightDisableNotAvailableException(FlashlightException):
3235
"""
33-
Exception thrown when an attempt was made to turn off the torch but it was detected that the device does not have one equipped.
36+
Exception thrown when an attempt was made to turn off the torch
37+
but it was detected that the device does not have one equipped.
3438
"""
3539

3640

0 commit comments

Comments
 (0)