Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for dangerous (0.32 sec)

  1. analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/controlFlow/defaultTryCatch.kt

    // WITH_STDLIB
    
    fun test() {
        consume(1)
        <expr>try {
            dangerous()
        } catch (e: FooException) {
            consume(e.message?.length ?: 0)
            "error"
        }</expr>
    }
    
    fun consume(n: Int) {}
    
    @Throws(FooException::class)
    fun dangerous(): String {
        return "foo"
    }
    
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Thu Mar 14 10:53:11 UTC 2024
    - 315 bytes
    - Viewed (0)
  2. analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/controlFlow/defaultTryCatch2.kt

    // WITH_STDLIB
    
    fun test() {
        consume(1)
        <expr>try {
            dangerous()
        } catch (e: FooException) {
            consume(e.message?.length ?: 0)
            throw e
        }</expr>
    }
    
    fun consume(n: Int) {}
    
    @Throws(FooException::class)
    fun dangerous(): String {
        return "foo"
    }
    
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Thu Mar 14 10:53:11 UTC 2024
    - 315 bytes
    - Viewed (0)
  3. analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/controlFlow/defaultTryCatch.txt

    KaDataFlowExitPointSnapshot:
      defaultExpressionInfo = DefaultExpressionInfo:
        expression = try {
                dangerous()
            } catch (e: FooException) {
                consume(e.message?.length ?: 0)
                "error"
            }
        type = kotlin.String
      hasEscapingJumps = false
      hasJumps = false
      hasMultipleJumpKinds = false
      hasMultipleJumpTargets = false
      jumpExpressions = []
      returnValueType = null
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 29 17:43:55 UTC 2024
    - 477 bytes
    - Viewed (0)
  4. analysis/analysis-api/testData/components/dataFlowInfoProvider/exitPointSnapshot/controlFlow/defaultTryCatch2.txt

    KaDataFlowExitPointSnapshot:
      defaultExpressionInfo = DefaultExpressionInfo:
        expression = try {
                dangerous()
            } catch (e: FooException) {
                consume(e.message?.length ?: 0)
                throw e
            }
        type = kotlin.String
      hasEscapingJumps = false
      hasJumps = false
      hasMultipleJumpKinds = false
      hasMultipleJumpTargets = false
      jumpExpressions = []
      returnValueType = null
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 29 17:43:55 UTC 2024
    - 477 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial008d_an_py39.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 734 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial008d.py

            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 694 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial008d_an.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 744 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial008d.py

        with pytest.raises(InternalError) as exc_info:
            client.get("/items/portal-gun")
        assert (
            exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick"
        )
    
    
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008d import app
    
        client = TestClient(app, raise_server_exceptions=False)
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  9. docs_src/dependencies/tutorial008c.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 660 bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial008c_an_py39.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 700 bytes
    - Viewed (0)
Back to top