/// Gets or sets the artist of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Artist
{
/// Gets or sets the title of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Title
{
/// Gets or sets the album name of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Album
{
/// Gets or sets the genre of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Genre
{
/// Gets or sets the author of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Author
{
/// Gets or sets the copyright of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Copyright
{
/// If the media contains the ID3 tag, this refers to the recorded date.
/// If the media is a mp4 format, this refers to the year, and the value to set will be converted into integer.
/// </remarks>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Date
{
/// Gets or sets the description of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Description
{
/// Gets or sets the comment of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Comment
{
/// Gets or sets the track number of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string TrackNumber
{
/// Gets or sets the conductor of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string Conductor
{
/// Gets or sets the unsynchronized lyrics of media.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="InvalidOperationException">The file is read-only.</exception>
+ /// <exception cref="InvalidOperationException">
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
+ /// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
public string UnsyncLyrics
{
/// Writes the modified metadata to the media file.
/// </summary>
/// <exception cref="InvalidOperationException">
- /// An internal error occurs.<br/>
- /// -or-<br/>
- /// The file is read-only.
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// Internal error.<br/>
/// </exception>
/// <exception cref="ObjectDisposedException">The <see cref="MetadataEditor"/> has already been disposed of.</exception>
/// <since_tizen> 3 </since_tizen>
/// <since_tizen> 3 </since_tizen>
/// <param name="path">The path of the picture for adding to the metadata.</param>
/// <exception cref="InvalidOperationException">
- /// An internal error occurs.<br/>
- /// -or-<br/>
- /// The media file is read-only.
+ /// The file is read-only.<br/>
+ /// -or-<br/>
+ /// The malformed file which cannot be updatable.<br/>
+ /// -or-<br/>
+ /// Internal error.
/// </exception>
/// <exception cref="ArgumentNullException"><paramref name="path"/> is null.</exception>
/// <exception cref="FileNotFoundException">The file does not exist.</exception>
-/*
+/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
PermissionDenied = ErrorCode.PermissionDenied,
NotSupported = ErrorCode.NotSupported,
TizenMetadataEditorError = -0x019C0000,
- OperationFailed = TizenMetadataEditorError | 0x01
+ OperationFailed = TizenMetadataEditorError | 0x01,
+ UpdateNotPossible = TizenMetadataEditorError | 0x02
}
internal static class MetadataEditorErrorExtensions
return;
}
+ var errorMessages = $"{errorCode.ToString()} : {errorMessage}";
+
switch (errorCode)
{
case MetadataEditorError.InvalidParameter:
- throw new ArgumentException(errorMessage);
+ throw new ArgumentException(errorMessages);
case MetadataEditorError.OutOfMemory:
- throw new OutOfMemoryException(errorMessage);
+ throw new OutOfMemoryException(errorMessages);
case MetadataEditorError.FileNotExists:
- throw new FileNotFoundException(errorMessage);
+ throw new FileNotFoundException(errorMessages);
case MetadataEditorError.PermissionDenied:
- throw new UnauthorizedAccessException(errorMessage);
+ throw new UnauthorizedAccessException(errorMessages);
case MetadataEditorError.NotSupported:
- throw new FileFormatException(errorMessage);
+ throw new FileFormatException(errorMessages);
case MetadataEditorError.OperationFailed:
- throw new InvalidOperationException(errorMessage);
+ case MetadataEditorError.UpdateNotPossible:
+ throw new InvalidOperationException(errorMessages);
}
}
}
}
-