- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 213 for raise (0.03 sec)
-
.github/actions/people/app/main.py
) logging.error(response.text) raise RuntimeError(response.text) data = response.json() if "errors" in data: logging.error(f"Errors in response, after: {after}, category_id: {category_id}") logging.error(data["errors"]) logging.error(response.text) raise RuntimeError(response.text) return data
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 19.2K bytes - Viewed (1) -
docs/zh/docs/tutorial/handling-errors.md
``` ### 触发 `HTTPException` `HTTPException` 是额外包含了和 API 有关数据的常规 Python 异常。 因为是 Python 异常,所以不能 `return`,只能 `raise`。 如在调用*路径操作函数*里的工具函数时,触发了 `HTTPException`,FastAPI 就不再继续执行*路径操作函数*中的后续代码,而是立即终止请求,并把 `HTTPException` 的 HTTP 错误发送至客户端。 在介绍依赖项与安全的章节中,您可以了解更多用 `raise` 异常代替 `return` 值的优势。 本例中,客户端用 `ID` 请求的 `item` 不存在时,触发状态码为 `404` 的异常: ```Python hl_lines="11"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.4K bytes - Viewed (0) -
scripts/mkdocs_hooks.py
resolve_file(item=values[0], files=files, config=config) elif isinstance(values[0], list): resolve_files(items=values[0], files=files, config=config) else: raise ValueError(f"Unexpected value: {values}") def on_files(files: Files, *, config: MkDocsConfig) -> Files: resolve_files(items=config.nav or [], files=files, config=config) if "logo" in config.theme:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 21:20:31 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
/// tip | "팁" 가능하다면 `Annotated`가 달린 버전을 권장합니다. /// ```Python hl_lines="6 11" {!> ../../docs_src/dependencies/tutorial006.py!} ``` //// ### 오류 발생시키기 다음 의존성은 기존 의존성과 동일하게 예외를 `raise`를 일으킬 수 있습니다: //// tab | Python 3.9+ ```Python hl_lines="10 15" {!> ../../docs_src/dependencies/tutorial006_an_py39.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="9 14"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.7K bytes - Viewed (0) -
tests/customize_field_test.go
RawBody string `gorm:"column:body"` } DB.Migrator().DropTable(&CustomColumnAndIgnoredFieldClash{}) if err := DB.AutoMigrate(&CustomColumnAndIgnoredFieldClash{}); err != nil { t.Errorf("Should not raise error: %v", err) } } func TestCustomizeField(t *testing.T) { type CustomizeFieldStruct struct { gorm.Model Name string FieldAllowCreate string `gorm:"<-:create"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Sep 11 09:33:31 UTC 2020 - 6.9K bytes - Viewed (0) -
fastapi/utils.py
"alias": alias, } ) try: return ModelField(**kwargs) # type: ignore[arg-type] except (RuntimeError, PydanticSchemaGenerationError): raise fastapi.exceptions.FastAPIError( "Invalid args for response field! Hint: " f"check that {type_} is a valid Pydantic field type. "
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 31 23:46:03 UTC 2024 - 7.8K bytes - Viewed (0) -
docs/ja/docs/advanced/websockets.md
クロージングコードは、<a href="https://tools.ietf.org/html/rfc6455#section-7.4.1" class="external-link" target="_blank">仕様で定義された有効なコード</a>の中から使用することができます。 将来的には、どこからでも `raise` できる `WebSocketException` が用意され、専用の例外ハンドラを追加できるようになる予定です。これは、Starlette の <a href="https://github.com/encode/starlette/pull/527" class="external-link" target="_blank">PR #527</a> に依存するものです。 /// ### 依存関係を用いてWebSocketsを試してみる
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.2K bytes - Viewed (0) -
fastapi/encoders.py
except Exception as e: errors: List[Exception] = [] errors.append(e) try: data = vars(obj) except Exception as e: errors.append(e) raise ValueError(errors) from e return jsonable_encoder( data, include=include, exclude=exclude, by_alias=by_alias, exclude_unset=exclude_unset,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 10.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt
length: Int, flags: Int, streamId: Int, ) { if (streamId == 0) throw IOException("PROTOCOL_ERROR: TYPE_DATA streamId == 0") // TODO: checkState open or half-closed (local) or raise STREAM_CLOSED val inFinished = flags and FLAG_END_STREAM != 0 val gzipped = flags and FLAG_COMPRESSED != 0 if (gzipped) { throw IOException("PROTOCOL_ERROR: FLAG_COMPRESSED without SETTINGS_COMPRESS_DATA")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 19.9K bytes - Viewed (0) -
tests/joins_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0)