Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for raise (0.45 sec)

  1. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ### Always `raise` in Dependencies with `yield` and `except` { #always-raise-in-dependencies-with-yield-and-except }
    
    If you catch an exception in a dependency with `yield`, unless you are raising another `HTTPException` or similar, you should re-raise the original exception.
    
    You can re-raise the same exception using `raise`:
    
    {* ../../docs_src/dependencies/tutorial008d_an_py39.py hl[17] *}
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/handling-errors.md

    ### Raise an `HTTPException` in your code { #raise-an-httpexception-in-your-code }
    
    `HTTPException` is a normal Python exception with additional data relevant for APIs.
    
    Because it's a Python exception, you don't `return` it, you `raise` it.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    They can declare request requirements (like headers) or other sub-dependencies:
    
    {* ../../docs_src/dependencies/tutorial006_an_py39.py hl[8,13] *}
    
    ### Raise exceptions { #raise-exceptions }
    
    These dependencies can `raise` exceptions, the same as normal dependencies:
    
    {* ../../docs_src/dependencies/tutorial006_an_py39.py hl[10,15] *}
    
    ### Return values { #return-values }
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/websockets.md

    {* ../../docs_src/websockets/tutorial002_an_py310.py hl[68:69,82] *}
    
    /// info
    
    As this is a WebSocket it doesn't really make sense to raise an `HTTPException`, instead we raise a `WebSocketException`.
    
    You can use a closing code from the <a href="https://tools.ietf.org/html/rfc6455#section-7.4.1" class="external-link" target="_blank">valid codes defined in the specification</a>.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/security/oauth2-scopes.md

    {* ../../docs_src/security/tutorial005_an_py310.py hl[47,117:129] *}
    
    ## Verify the `scopes` { #verify-the-scopes }
    
    We now verify that all the scopes required, by this dependency and all the dependants (including *path operations*), are included in the scopes provided in the token received, otherwise raise an `HTTPException`.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:49:48 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  6. tests/delete_test.go

    		t.Errorf("failed to delete user, got error %v", err)
    	}
    
    	var result2 UserWithDelete
    	if err := DB.Table("deleted_users").First(&result2, user.ID).Error; !errors.Is(err, gorm.ErrRecordNotFound) {
    		t.Errorf("should raise record not found error, but got error %v", err)
    	}
    
    	var result3 UserWithDelete
    	if err := DB.Table("deleted_users").Unscoped().First(&result3, user.ID).Error; err != nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/AllocInfoTest.java

            when(mockAllocInfo.getCapacity()).thenReturn(capacity);
            assertEquals(capacity, mockAllocInfo.getCapacity());
        }
    
        /**
         * Null pointer scenario – calls on a null reference should raise
         * {@link NullPointerException}. This test is defensive; in real code it
         * would likely be handled elsewhere.
         */
        @Test
        @DisplayName("calling getters on null reference throws NPE")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/ioctl/Smb2IoctlResponseTest.java

        }
    
        @Test
        void throwsOnUnexpectedStructureSize() throws Exception {
            // structureSize != 49 and != 9 should raise an exception
            byte[] header = buildHeader(NtStatus.NT_STATUS_SUCCESS);
            byte[] buf = new byte[header.length + 10];
            System.arraycopy(header, 0, buf, 0, header.length);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  9. tests/query_test.go

    	DB.Create(&user)
    
    	var result User
    	if DB.Where("").Where("").First(&result).Error != nil {
    		t.Errorf("Should not raise any error if searching with empty strings")
    	}
    
    	result = User{}
    	if DB.Where(&User{}).Where("name = ?", user.Name).First(&result).Error != nil {
    		t.Errorf("Should not raise any error if searching with empty struct")
    	}
    
    	result = User{}
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Jul 22 06:21:04 UTC 2025
    - 51K bytes
    - Viewed (0)
  10. docs/em/docs/advanced/security/oauth2-scopes.md

    `security_scopes` 🎚 (🎓 `SecurityScopes`) 🚚 `scope_str` 🔢 ⏮️ 👁 🎻, 🔌 👈 ↔ 👽 🚀 (👥 🔜 ⚙️ ⚫️).
    
    👥 ✍ `HTTPException` 👈 👥 💪 🏤-⚙️ (`raise`) ⏪ 📚 ☝.
    
    👉 ⚠, 👥 🔌 ↔ 🚚 (🚥 🙆) 🎻 👽 🚀 (⚙️ `scope_str`). 👥 🚮 👈 🎻 ⚗ ↔ `WWW-Authenticate` 🎚 (👉 🍕 🔌).
    
    {* ../../docs_src/security/tutorial005.py hl[105,107:115] *}
    
    ## ✔ `username` &amp; 💽 💠
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:03:10 UTC 2025
    - 10.8K bytes
    - Viewed (0)
Back to top